@hupan56/wlkj 3.0.0 → 3.1.2
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 +1435 -1373
- package/package.json +1 -1
- package/templates/qoder/commands/optional/wl-insight.md +6 -4
- package/templates/qoder/commands/optional/wl-report.md +20 -39
- package/templates/qoder/commands/optional/wl-status.md +4 -4
- package/templates/qoder/commands/wl-code.md +2 -2
- package/templates/qoder/commands/wl-design.md +5 -5
- package/templates/qoder/commands/wl-init.md +3 -3
- package/templates/qoder/commands/wl-prd.md +26 -13
- package/templates/qoder/commands/wl-req.md +3 -3
- package/templates/qoder/commands/wl-search.md +78 -47
- package/templates/qoder/commands/wl-task.md +343 -40
- package/templates/qoder/commands/wl-test.md +10 -10
- package/templates/qoder/config.yaml +35 -13
- package/templates/qoder/hooks/post-tool-use.py +181 -0
- package/templates/qoder/hooks/session-start.py +82 -1
- package/templates/qoder/hooks/stop-eval.py +207 -0
- package/templates/qoder/hooks/user-prompt-submit.py +139 -0
- package/templates/qoder/rules/wl-pipeline.md +70 -8
- package/templates/qoder/scripts/README.md +78 -115
- package/templates/qoder/scripts/capability/__init__.py +26 -0
- package/templates/qoder/scripts/capability/__main__.py +72 -0
- package/templates/qoder/scripts/capability/adapters/__init__.py +29 -0
- package/templates/qoder/scripts/capability/adapters/cli.py +316 -0
- package/templates/qoder/scripts/capability/adapters/mcp.py +334 -0
- package/templates/qoder/scripts/capability/adapters/qw.py +271 -0
- package/templates/qoder/scripts/capability/caps/__init__.py +27 -0
- package/templates/qoder/scripts/capability/caps/context.py +36 -0
- package/templates/qoder/scripts/capability/caps/cron.py +50 -0
- package/templates/qoder/scripts/capability/caps/identity.py +43 -0
- package/templates/qoder/scripts/capability/caps/memory.py +71 -0
- package/templates/qoder/scripts/capability/caps/notify.py +41 -0
- package/templates/qoder/scripts/capability/caps/present.py +48 -0
- package/templates/qoder/scripts/capability/caps/repo.py +31 -0
- package/templates/qoder/scripts/capability/caps/sandbox.py +43 -0
- package/templates/qoder/scripts/capability/chain.py +92 -0
- package/templates/qoder/scripts/capability/memory_chain.py +41 -0
- package/templates/qoder/scripts/capability/registry.py +246 -0
- package/templates/qoder/scripts/capability/registry_mcp.py +250 -0
- package/templates/qoder/scripts/capability/smoke_test.py +211 -0
- package/templates/qoder/scripts/capability/smoke_test_report.json +94 -0
- package/templates/qoder/scripts/{report → deployment/setup}/__init__.py +11 -11
- package/templates/qoder/scripts/{setup → deployment/setup}/carriers.py +33 -26
- package/templates/qoder/scripts/deployment/setup/carriers_verify.py +148 -0
- package/templates/qoder/scripts/{setup → deployment/setup}/init_doctor.py +40 -16
- package/templates/qoder/scripts/{setup → deployment/setup}/install_qoderwork.py +20 -12
- package/templates/qoder/scripts/{setup → deployment/setup}/platform_doctor.py +8 -2
- package/templates/qoder/scripts/{setup → deployment/setup}/repo_root.py +113 -112
- package/templates/qoder/scripts/{setup → deployment/setup}/setup.py +31 -11
- package/templates/qoder/scripts/{setup → deployment/setup}/setup_lanhu.py +13 -7
- package/templates/qoder/scripts/domain/__init__.py +0 -0
- package/templates/qoder/scripts/domain/design/__init__.py +0 -0
- package/templates/qoder/scripts/{report → domain/design}/fill_prototype.py +12 -6
- package/templates/qoder/scripts/{report → domain/design}/gen_design_doc.py +8 -2
- package/templates/qoder/scripts/{setup → domain/kg}/__init__.py +11 -11
- package/templates/qoder/scripts/domain/kg/build/__init__.py +0 -0
- package/templates/qoder/scripts/{kg → domain/kg/build}/build_entity_registry.py +7 -2
- package/templates/qoder/scripts/{kg → domain/kg/build}/build_relations.py +7 -2
- package/templates/qoder/scripts/{kg → domain/kg/build}/build_style_index.py +13 -7
- package/templates/qoder/scripts/{kg → domain/kg/build}/build_workflows.py +7 -2
- package/templates/qoder/scripts/{kg → domain/kg/build}/kg_build.py +76 -9
- package/templates/qoder/scripts/{kg → domain/kg/build}/kg_build_db.py +7 -2
- package/templates/qoder/scripts/{kg → domain/kg/build}/kg_incremental.py +11 -6
- package/templates/qoder/scripts/{report → domain/kg/build}/learn_aggregate.py +9 -4
- package/templates/qoder/scripts/domain/kg/extract/__init__.py +0 -0
- package/templates/qoder/scripts/{common → domain/kg/extract}/extract.py +430 -419
- package/templates/qoder/scripts/{common → domain/kg/extract}/test_extract.py +115 -115
- package/templates/qoder/scripts/{common → domain/kg/extract}/ts_extract.py +614 -536
- package/templates/qoder/scripts/domain/kg/graph/__init__.py +0 -0
- package/templates/qoder/scripts/{kg → domain/kg/graph}/kg_link_db.py +7 -2
- package/templates/qoder/scripts/domain/kg/graph/kg_semantic.py +683 -0
- package/templates/qoder/scripts/{kg → domain/kg}/kg.py +263 -30
- package/templates/qoder/scripts/{common → domain/kg}/kg_capabilities.py +182 -182
- package/templates/qoder/scripts/domain/kg/search/__init__.py +0 -0
- package/templates/qoder/scripts/{kg → domain/kg/search}/context_pack.py +30 -9
- package/templates/qoder/scripts/{kg → domain/kg/search}/enrich_prompt.py +10 -4
- package/templates/qoder/scripts/{kg → domain/kg/search}/prefetch.py +33 -8
- package/templates/qoder/scripts/{common → domain/kg/search}/search_engine.py +207 -205
- package/templates/qoder/scripts/{kg → domain/kg/search}/search_index.py +143 -77
- package/templates/qoder/scripts/domain/kg/server/__init__.py +0 -0
- package/templates/qoder/scripts/domain/kg/server/kgd.py +549 -0
- package/templates/qoder/scripts/domain/kg/server/perf_bench.py +197 -0
- package/templates/qoder/scripts/domain/kg/storage/__init__.py +0 -0
- package/templates/qoder/scripts/{kg → domain/kg/storage}/kg_duckdb.py +38 -14
- package/templates/qoder/scripts/domain/learning/__init__.py +0 -0
- package/templates/qoder/scripts/{report → domain/learning}/learn.py +8 -3
- package/templates/qoder/scripts/{mcp → domain/report}/__init__.py +11 -11
- package/templates/qoder/scripts/{report → domain/report}/add_session.py +9 -3
- package/templates/qoder/scripts/{report → domain/report}/export.py +10 -5
- package/templates/qoder/scripts/{report → domain/report}/report.py +9 -4
- package/templates/qoder/scripts/domain/report/report_snapshot.py +261 -0
- package/templates/qoder/scripts/{report → domain/report}/role.py +10 -4
- package/templates/qoder/scripts/{report → domain/report}/status.py +112 -9
- package/templates/qoder/scripts/domain/report/status_snapshot.py +191 -0
- package/templates/qoder/scripts/domain/requirement/__init__.py +0 -0
- package/templates/qoder/scripts/{report → domain/requirement}/archive_prd.py +8 -2
- package/templates/qoder/scripts/{report → domain/requirement}/req.py +228 -222
- package/templates/qoder/scripts/{kg → domain/task}/__init__.py +11 -11
- package/templates/qoder/scripts/{task → domain/task}/git_sync.py +40 -21
- package/templates/qoder/scripts/{task → domain/task}/syncgate.py +13 -8
- package/templates/qoder/scripts/{task → domain/task}/task.py +13 -5
- package/templates/qoder/scripts/{task → domain/task}/task_lifecycle.py +606 -596
- package/templates/qoder/scripts/{task → domain/task}/task_query.py +162 -161
- package/templates/qoder/scripts/{task → domain/task}/task_relations.py +425 -424
- package/templates/qoder/scripts/{task → domain/task}/team_sync.py +9 -4
- package/templates/qoder/scripts/domain/task/zentao_sync.py +370 -0
- package/templates/qoder/scripts/foundation/__init__.py +0 -0
- package/templates/qoder/scripts/{common → foundation}/bootstrap.py +10 -10
- package/templates/qoder/scripts/foundation/core/__init__.py +0 -0
- package/templates/qoder/scripts/{common → foundation/core}/cmd_registry.py +1 -1
- package/templates/qoder/scripts/{common → foundation/core}/config.py +1 -1
- package/templates/qoder/scripts/{common → foundation/core}/paths.py +706 -586
- package/templates/qoder/scripts/foundation/data/__init__.py +0 -0
- package/templates/qoder/scripts/{common → foundation/data}/contract.py +2 -2
- package/templates/qoder/scripts/{common → foundation/data}/events.py +2 -2
- package/templates/qoder/scripts/{common → foundation/data}/result.py +1 -1
- package/templates/qoder/scripts/{common → foundation/data}/task_utils.py +427 -404
- package/templates/qoder/scripts/foundation/identity/__init__.py +0 -0
- package/templates/qoder/scripts/{common → foundation/identity}/check_publish.py +103 -98
- package/templates/qoder/scripts/{common → foundation/identity}/developer.py +239 -239
- package/templates/qoder/scripts/{common → foundation/identity}/guard.py +2 -2
- package/templates/qoder/scripts/{common → foundation/identity}/identity.py +14 -10
- package/templates/qoder/scripts/{common → foundation/identity}/roles.py +1 -1
- package/templates/qoder/scripts/foundation/integrations/__init__.py +0 -0
- package/templates/qoder/scripts/{common → foundation/integrations}/active_task.py +30 -15
- package/templates/qoder/scripts/{common → foundation/integrations}/feishu.py +2 -2
- package/templates/qoder/scripts/{common → foundation/integrations}/terms.py +3 -3
- package/templates/qoder/scripts/foundation/integrations/zentao_client.py +220 -0
- package/templates/qoder/scripts/foundation/io/__init__.py +0 -0
- package/templates/qoder/scripts/{common → foundation/io}/filelock.py +1 -1
- package/templates/qoder/scripts/{common → foundation/io}/reqid.py +1 -1
- package/templates/qoder/scripts/foundation/protocol/__init__.py +0 -0
- package/templates/qoder/scripts/foundation/protocol/duckdb_conn.py +39 -0
- package/templates/qoder/scripts/{common → foundation/protocol}/mcp_base.py +1 -1
- package/templates/qoder/scripts/foundation/utils/__init__.py +0 -0
- package/templates/qoder/scripts/{common → foundation/utils}/eval_api.py +12 -1
- package/templates/qoder/scripts/{common → foundation/utils}/pip_install.py +23 -6
- package/templates/qoder/scripts/{common → foundation/utils}/platform_guard.py +1 -1
- package/templates/qoder/scripts/orchestration/__init__.py +0 -0
- package/templates/qoder/scripts/orchestration/wlkj.py +185 -0
- package/templates/qoder/scripts/protocol/__init__.py +0 -0
- package/templates/qoder/scripts/protocol/browser/README.md +207 -0
- package/templates/qoder/scripts/protocol/browser/SKILL.md +265 -0
- package/templates/qoder/scripts/protocol/browser/config.env +9 -0
- package/templates/qoder/scripts/protocol/browser/references/cdp-api.md +110 -0
- package/templates/qoder/scripts/protocol/browser/references/migration-2.5.3.md +72 -0
- package/templates/qoder/scripts/protocol/browser/references/site-patterns/.gitkeep +0 -0
- package/templates/qoder/scripts/protocol/browser/scripts/browser-discovery.mjs +138 -0
- package/templates/qoder/scripts/protocol/browser/scripts/cdp-proxy.mjs +672 -0
- package/templates/qoder/scripts/protocol/browser/scripts/check-deps.mjs +206 -0
- package/templates/qoder/scripts/protocol/browser/scripts/find-url.mjs +253 -0
- package/templates/qoder/scripts/protocol/browser/scripts/match-site.mjs +46 -0
- package/templates/qoder/scripts/protocol/browser/templates/config.env.template +9 -0
- package/templates/qoder/scripts/protocol/mcp/__init__.py +11 -0
- package/templates/qoder/scripts/protocol/mcp/kg_mcp_server.py +478 -0
- package/templates/qoder/scripts/{mcp → protocol/mcp}/lanhu_stdio_wrapper.py +11 -5
- package/templates/qoder/scripts/{mcp → protocol/mcp}/mcp_doctor.py +47 -14
- package/templates/qoder/scripts/protocol/mcp/mcp_launcher.py +600 -0
- package/templates/qoder/scripts/{mcp → protocol/mcp}/mysql_mcp_server.py +181 -67
- package/templates/qoder/scripts/protocol/mcp/zentao_mcp_server.py +1920 -0
- package/templates/qoder/scripts/protocol/transports/__init__.py +56 -0
- package/templates/qoder/scripts/protocol/transports/base.py +87 -0
- package/templates/qoder/scripts/protocol/transports/cli.py +132 -0
- package/templates/qoder/scripts/protocol/transports/http.py +141 -0
- package/templates/qoder/scripts/protocol/transports/stdio.py +293 -0
- package/templates/qoder/scripts/run_weekly_update.bat +27 -18
- package/templates/qoder/scripts/run_weekly_update.sh +22 -13
- package/templates/qoder/scripts/validation/__init__.py +0 -0
- package/templates/qoder/scripts/validation/eval/__init__.py +0 -0
- package/templates/qoder/scripts/validation/eval/perf-report-2026-06-24.md +139 -0
- package/templates/qoder/scripts/validation/eval/qwork_harness.py +617 -0
- package/templates/qoder/scripts/validation/eval/report-commands.md +220 -0
- package/templates/qoder/scripts/validation/eval/transcript_timing.py +386 -0
- package/templates/qoder/scripts/validation/metrics/__init__.py +0 -0
- package/templates/qoder/scripts/{report → validation/metrics}/eval_prd.py +17 -10
- package/templates/qoder/scripts/validation/metrics/usability_score.py +750 -0
- package/templates/qoder/scripts/validation/test/__init__.py +11 -0
- package/templates/qoder/scripts/validation/test/assertion_gen.py +551 -0
- package/templates/qoder/scripts/{test → validation/test}/autotest.py +64 -4
- package/templates/qoder/scripts/{common → validation/test}/autotest_auth.py +1 -1
- package/templates/qoder/scripts/{test → validation/test}/autotest_batch.py +16 -3
- package/templates/qoder/scripts/{test → validation/test}/autotest_data.py +17 -12
- package/templates/qoder/scripts/validation/test/autotest_opencli.py +646 -0
- package/templates/qoder/scripts/{test → validation/test}/autotest_run.py +17 -3
- package/templates/qoder/scripts/validation/test/autotest_webaccess.py +571 -0
- package/templates/qoder/scripts/{test → validation/test}/benchmark.py +12 -6
- package/templates/qoder/scripts/{test → validation/test}/kg_auto_login.py +8 -2
- package/templates/qoder/scripts/{test → validation/test}/kg_test_runner.py +7 -2
- package/templates/qoder/scripts/{test → validation/test}/page_probe.py +8 -3
- package/templates/qoder/scripts/validation/test/smoke_all_commands.py +170 -0
- package/templates/qoder/settings.json +30 -0
- package/templates/qoder/skills/design-import/SKILL.md +22 -13
- package/templates/qoder/skills/design-review/SKILL.md +19 -10
- package/templates/qoder/skills/prd-generator/SKILL.md +22 -18
- package/templates/qoder/skills/prd-review/SKILL.md +6 -4
- package/templates/qoder/skills/prototype-generator/SKILL.md +63 -14
- package/templates/qoder/skills/spec-coder/SKILL.md +22 -13
- package/templates/qoder/skills/spec-generator/SKILL.md +22 -10
- package/templates/qoder/skills/test-generator/SKILL.md +7 -5
- package/templates/qoder/skills/wl-code/SKILL.md +23 -11
- package/templates/qoder/skills/wl-commit/SKILL.md +9 -8
- package/templates/qoder/skills/wl-design/SKILL.md +5 -3
- package/templates/qoder/skills/wl-init/SKILL.md +6 -6
- package/templates/qoder/skills/wl-insight/SKILL.md +23 -10
- package/templates/qoder/skills/wl-prd-full/SKILL.md +57 -6
- package/templates/qoder/skills/wl-prd-quick/SKILL.md +3 -3
- package/templates/qoder/skills/wl-prd-review/SKILL.md +16 -4
- package/templates/qoder/skills/wl-report/SKILL.md +25 -23
- package/templates/qoder/skills/wl-search/SKILL.md +149 -78
- package/templates/qoder/skills/wl-spec/SKILL.md +7 -5
- package/templates/qoder/skills/wl-status/SKILL.md +48 -16
- package/templates/qoder/skills/wl-task/SKILL.md +92 -10
- package/templates/qoder/skills/wl-test/SKILL.md +75 -29
- package/templates/qoder/templates/prd-full-template.md +7 -0
- package/templates/root/AGENTS.md +275 -236
- package/templates/root/requirements.txt +3 -0
- package/templates/root//344/275/277/347/224/250/350/257/264/346/230/216.md +3 -3
- package/templates/root//346/226/260/346/211/213/346/214/207/345/215/227.md +2 -2
- package/templates/.qoder/.runtime/ctx-cache-5660152f1d6dd819.md +0 -23
- package/templates/.qoder/.runtime/ctx-cache-afdce0dac06b25b0.md +0 -23
- package/templates/.qoder/.runtime/search-cache-eae7644e7b122f35.txt +0 -1
- package/templates/.qoder/learning/eval-history.jsonl +0 -28
- package/templates/data/index/wiki-index.json +0 -8
- package/templates/qoder/nul +0 -4
- package/templates/qoder/scripts/kg/extract.py +0 -398
- package/templates/qoder/scripts/kg/kg_semantic.py +0 -156
- package/templates/qoder/scripts/mcp/kg_mcp_server.py +0 -606
- package/templates/qoder/scripts/mcp/mcp_launcher.py +0 -442
- package/templates/qoder/scripts/mcp/zentao_mcp_server.py +0 -384
- package/templates/qoder/scripts/task/__init__.py +0 -11
- package/templates/qoder/scripts/test/__init__.py +0 -11
- package/templates/qoder/scripts/wlkj.py +0 -116
- /package/templates/qoder/scripts/{common → deployment}/__init__.py +0 -0
- /package/templates/qoder/scripts/{common → domain/kg/graph}/graph_traverse.py +0 -0
- /package/templates/qoder/scripts/{common → domain/kg/server}/repowiki.py +0 -0
- /package/templates/qoder/scripts/{common → foundation/io}/atomicio.py +0 -0
- /package/templates/qoder/scripts/{test → validation/test}/secure-ls.js +0 -0
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ User input: $ARGUMENTS
|
|
|
25
25
|
```bash
|
|
26
26
|
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
27
27
|
```
|
|
28
|
-
> 后续脚本统一用 `python "$R/.qoder/scripts
|
|
28
|
+
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -53,7 +53,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
53
53
|
## 🔒 通用前置(所有段必做)
|
|
54
54
|
|
|
55
55
|
1. **身份**:读 `.qoder/.developer`,缺失 → 停下提示 `/wl-init`
|
|
56
|
-
2. **现状锚点**:`python "$R/.qoder/scripts/
|
|
56
|
+
2. **现状锚点**:`python "$R/.qoder/scripts/orchestration/wlkj.py" context <关键词> --platform <web|app>`(必跑,秒级)
|
|
57
57
|
3. **历史参考**:扫 `data/docs/prd/` 看已做过的,扫历史 insight 报告看是否聊过
|
|
58
58
|
|
|
59
59
|
---
|
|
@@ -97,10 +97,12 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
99
|
# Web 管理端
|
|
100
|
-
python "$R/.qoder/scripts/wlkj.py" prototype --
|
|
100
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" fill-prototype "<刚才对焦到的业务关键词>" --platform web
|
|
101
101
|
# APP 移动端
|
|
102
|
-
python "$R/.qoder/scripts/wlkj.py" prototype --
|
|
102
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" fill-prototype "<刚才对焦到的业务关键词>" --platform app
|
|
103
103
|
```
|
|
104
|
+
> fill-prototype 会按 platform 自动选 prototype-web.html / prototype-app.html 模板,
|
|
105
|
+
> 用知识图谱里的真实字段/组件把模板填满, 输出到 drafts/。
|
|
104
106
|
|
|
105
107
|
原型要求:
|
|
106
108
|
- **项目真实风格**(Web=Vben Admin+Ant Design / App=Vant),不是草稿线框图
|
|
@@ -16,7 +16,7 @@ User input: $ARGUMENTS
|
|
|
16
16
|
```bash
|
|
17
17
|
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
18
18
|
```
|
|
19
|
-
> 后续脚本统一用 `python "$R/.qoder/scripts
|
|
19
|
+
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`;所有仓库内相对路径(workspace/、data/code/)都前置 `"$R/"`。
|
|
20
20
|
|
|
21
21
|
## CRITICAL: Data Isolation
|
|
22
22
|
|
|
@@ -35,52 +35,33 @@ If no developer is set, refuse and say "Run /wl-init first".
|
|
|
35
35
|
|
|
36
36
|
## Data Sources (All Filtered by Current Developer)
|
|
37
37
|
|
|
38
|
-
###
|
|
39
|
-
```
|
|
40
|
-
Read .qoder/.developer -> get developer name (e.g., "小王")
|
|
41
|
-
This name is used to filter ALL data below.
|
|
42
|
-
```
|
|
38
|
+
### ⚡ Fast Path:一次拿全(必须先跑,禁止逐个 cat/ls/git log)
|
|
43
39
|
|
|
44
|
-
### 2. My Tasks (workspace/tasks/)
|
|
45
40
|
```bash
|
|
46
|
-
|
|
47
|
-
python "$R/.qoder/scripts/
|
|
41
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
42
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" report-snapshot "$R" # 日报(今天)
|
|
43
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" report-snapshot "$R" --days 7 # 周报(近7天)
|
|
48
44
|
```
|
|
49
|
-
Only show tasks where task.json has:
|
|
50
|
-
- `creator` == current developer, OR
|
|
51
|
-
- `assignee` == current developer
|
|
52
45
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
一个命令返回 JSON,**5 个数据源已全部按当前开发者过滤**:
|
|
47
|
+
- `developer` — 当前开发者名(过滤键)
|
|
48
|
+
- `my_tasks` — task.py list --mine 的结果
|
|
49
|
+
- `commits` — {项目: [提交]} 自动扫 data/code/ 各项目按 author 过滤
|
|
50
|
+
- `journal` — 该开发者 journal 的学习/反馈事件
|
|
51
|
+
- `my_prds` — 该开发者写的 PRD/草稿
|
|
52
|
+
- `date_range` — 报告日期范围
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
# For each project in data/code/:
|
|
62
|
-
cd "$R/data/code/{project}"
|
|
63
|
-
git log --author="{current_developer}" --since="{date}" --oneline
|
|
64
|
-
```
|
|
65
|
-
Filter by git author matching current developer name.
|
|
66
|
-
|
|
67
|
-
### 5. My PRDs
|
|
68
|
-
```
|
|
69
|
-
Read: workspace/members/{current_developer}/drafts/ -> drafts by this developer
|
|
70
|
-
Read: workspace/specs/prd/*.md -> check if PRD frontmatter has author == current developer
|
|
71
|
-
```
|
|
54
|
+
> 性能:旧方式 7 步顺序采集、5-7 次调用;聚合后 1 轮 1 次调用(实测更快)。
|
|
55
|
+
> `developer` 为 "(未设置)" → 停下,提示先 `/wl-init`。缺失字段为 null = 该源无内容,如实写"无产出"。
|
|
72
56
|
|
|
73
57
|
---
|
|
74
58
|
|
|
75
59
|
## Daily Report Flow
|
|
76
60
|
|
|
77
|
-
1.
|
|
78
|
-
2.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
5. Read developer's journal entries from today
|
|
82
|
-
6. Check developer's drafts for new PRDs
|
|
83
|
-
7. Generate report with ONLY this developer's data
|
|
61
|
+
1. **跑聚合脚本一次拿全数据**(见上 Fast Path,已含 developer/tasks/commits/journal/prds)
|
|
62
|
+
2. **用拿到的数据生成报告**(只写当前开发者的数据,见下方模板)
|
|
63
|
+
|
|
64
|
+
> 禁止再逐个 cat .developer / ls / git log —— 聚合脚本已全给。数据源无内容就如实写"无产出"。
|
|
84
65
|
|
|
85
66
|
Output:
|
|
86
67
|
```
|
|
@@ -102,7 +83,7 @@ Output:
|
|
|
102
83
|
```
|
|
103
84
|
|
|
104
85
|
Save to: workspace/members/{developer}/journal/daily-{date}.md
|
|
105
|
-
Then auto-sync (user never touches git): `
|
|
86
|
+
Then auto-sync (user never touches git): `cap.mcp.call("sync", {"direction": "push"})`
|
|
106
87
|
|
|
107
88
|
---
|
|
108
89
|
|
|
@@ -151,7 +132,7 @@ Output:
|
|
|
151
132
|
```
|
|
152
133
|
|
|
153
134
|
Save to: workspace/members/{developer}/journal/weekly-{week}.md
|
|
154
|
-
Then auto-sync (user never touches git): `
|
|
135
|
+
Then auto-sync (user never touches git): `cap.mcp.call("sync", {"direction": "push"})`
|
|
155
136
|
|
|
156
137
|
---
|
|
157
138
|
|
|
@@ -16,7 +16,7 @@ User input: $ARGUMENTS (default: show current status)
|
|
|
16
16
|
```bash
|
|
17
17
|
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
18
18
|
```
|
|
19
|
-
> 后续脚本统一用 `python "$R/.qoder/scripts
|
|
19
|
+
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`;仓库内相对路径都前置 `"$R/"`。
|
|
20
20
|
|
|
21
21
|
## Scopes
|
|
22
22
|
- (no arg or "current") -> Current sprint status
|
|
@@ -30,7 +30,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
30
30
|
|
|
31
31
|
**PREFERRED: MCP 工具:**
|
|
32
32
|
```
|
|
33
|
-
|
|
33
|
+
cap.mcp.call("feature_overview", {"feature": "资产管理"})
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
返回:该功能的完整画像——后端端点 + 前端按钮 + 测试用例 + 关联页面 + PRD。
|
|
@@ -66,10 +66,10 @@ Show:
|
|
|
66
66
|
## Health Score
|
|
67
67
|
Calculate from:
|
|
68
68
|
| Dimension | Weight | Source |
|
|
69
|
-
| EVA quality trend | 25% | tail
|
|
69
|
+
| EVA quality trend | 25% | tail data/learning/eval-history.jsonl (avg score_pct, target >=80) |
|
|
70
70
|
| Index freshness | 20% | data/index/.index-meta.json last_sync (<=7 days) + verify checks |
|
|
71
71
|
| On-time delivery | 20% | task completion dates |
|
|
72
|
-
| Sync health | 15% | python "$R/.qoder/scripts/
|
|
72
|
+
| Sync health | 15% | python "$R/.qoder/scripts/orchestration/wlkj.py" sync status (ahead/behind/dirty) |
|
|
73
73
|
| Pipeline flow | 10% | PRD->Spec->Code conversion |
|
|
74
74
|
| Learning growth | 10% | learning/patterns/ entries |
|
|
75
75
|
|
|
@@ -16,7 +16,7 @@ User input: $ARGUMENTS
|
|
|
16
16
|
```bash
|
|
17
17
|
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
18
18
|
```
|
|
19
|
-
> 后续脚本统一用 `python "$R/.qoder/scripts
|
|
19
|
+
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
20
20
|
|
|
21
21
|
## Step 1: Load Spec
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ Read the spec file to understand requirements.
|
|
|
26
26
|
|
|
27
27
|
## Step 2: Search Related Code
|
|
28
28
|
|
|
29
|
-
Run: python "$R/.qoder/scripts/
|
|
29
|
+
Run: python "$R/.qoder/scripts/orchestration/wlkj.py" search <keyword>
|
|
30
30
|
Find existing code that this implementation relates to.
|
|
31
31
|
Read relevant files for context.
|
|
32
32
|
|
|
@@ -3,7 +3,7 @@ name: wl-design
|
|
|
3
3
|
description: "设计工序入口: import 录入设计稿→spec.json(默认) / generate 按设计spec出原型 / review 评审原型。"
|
|
4
4
|
argument-hint: "[预览|扫描|评审] <蓝湖链接或功能名>"
|
|
5
5
|
auto-approve: true
|
|
6
|
-
allowed-tools: [Read, Glob, Grep, Bash, Write, Edit
|
|
6
|
+
allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# /wl-design - 设计工序站
|
|
@@ -32,14 +32,14 @@ User input: $ARGUMENTS
|
|
|
32
32
|
|
|
33
33
|
**Step 1:列设计稿**
|
|
34
34
|
```
|
|
35
|
-
|
|
35
|
+
cap.mcp.call("lanhu_get_designs", {"url": "<蓝湖链接>"})
|
|
36
36
|
```
|
|
37
37
|
- 蓝湖链接含 `pid`(项目 ID),如 `https://lanhuapp.com/web/#/item/project/stage?tid=xxx&pid=xxx`
|
|
38
38
|
- 返回设计稿列表(名称 + 序号)
|
|
39
39
|
|
|
40
40
|
**Step 2:分析出 HTML**
|
|
41
41
|
```
|
|
42
|
-
|
|
42
|
+
cap.mcp.call("lanhu_get_ai_analyze_design_result", {"url": "<蓝湖链接>", "design_names": "<名称或序号或all>"})
|
|
43
43
|
```
|
|
44
44
|
- 返回 **HTML+CSS 代码**(工具原文:"GET VISUAL CONTENT + HTML CODE")
|
|
45
45
|
- AI 把返回的 HTML 存成文件:`workspace/members/{developer}/drafts/prototype-{feature}.html`
|
|
@@ -64,7 +64,7 @@ mcp__lanhu__lanhu_get_ai_analyze_design_result(url="<蓝湖链接>", design_name
|
|
|
64
64
|
|
|
65
65
|
### 流程(1 次调用取全)
|
|
66
66
|
```
|
|
67
|
-
|
|
67
|
+
cap.mcp.call("context_pack", {"keyword": "<功能名>", "platform": "web"})
|
|
68
68
|
```
|
|
69
69
|
返回 8 段:相关代码 + 同类页面 + 字段 + API + 风格 token + 组件 + 数据库表结构。
|
|
70
70
|
|
|
@@ -121,5 +121,5 @@ mcp__qoder-knowledge-graph__context_pack(keyword='<功能名>', platform='web')
|
|
|
121
121
|
|
|
122
122
|
评审输出后,记录到 learning:
|
|
123
123
|
```bash
|
|
124
|
-
python "$R/.qoder/scripts/
|
|
124
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" learn record review_done "{\"target\":\"$feature\",\"result\":\"$pass_or_issues\"}"
|
|
125
125
|
```
|
|
@@ -19,7 +19,7 @@ Usage:
|
|
|
19
19
|
```bash
|
|
20
20
|
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
21
21
|
```
|
|
22
|
-
> `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。后续脚本统一用 `python "$R/.qoder/scripts
|
|
22
|
+
> `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
23
23
|
|
|
24
24
|
## Engine: init_doctor.py (幂等, 增量, 永不重头再来)
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
28
28
|
|
|
29
29
|
### Case 1: /wl-init (no arguments)
|
|
30
30
|
```bash
|
|
31
|
-
python "$R/.qoder/scripts/
|
|
31
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" doctor
|
|
32
32
|
```
|
|
33
33
|
Report the doctor's findings to the user in friendly language.
|
|
34
34
|
If it found fixable issues, ask: "发现 N 个问题,要我自动修复吗?"
|
|
@@ -36,7 +36,7 @@ then run with --fix.
|
|
|
36
36
|
|
|
37
37
|
### Case 2/3: /wl-init 小王 [pm]
|
|
38
38
|
```bash
|
|
39
|
-
python "$R/.qoder/scripts/
|
|
39
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" doctor --fix 小王 [pm]
|
|
40
40
|
```
|
|
41
41
|
This single command does ALL of:
|
|
42
42
|
1. 注册/切换开发者 (.qoder/.developer, key=value 格式) + 个人空间目录
|
|
@@ -3,7 +3,7 @@ name: wl-prd
|
|
|
3
3
|
description: "需求: 完整(13章,新功能) / 快速(6章,小改动) / 评审(检查质量)。默认根据描述自动判断。"
|
|
4
4
|
argument-hint: "[完整|快速|评审] [需求描述] 可选: 参考:<insight报告路径>"
|
|
5
5
|
auto-approve: true
|
|
6
|
-
allowed-tools: [Read, Glob, Grep, Bash, Write, Edit
|
|
6
|
+
allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# /wl-prd - 需求工序站
|
|
@@ -34,32 +34,45 @@ User input: $ARGUMENTS
|
|
|
34
34
|
**新模块/新业务/新流程用这个。** 支持衔接 insight:`参考:<报告路径>`
|
|
35
35
|
|
|
36
36
|
**铁律:平台必问。** 先问:
|
|
37
|
-
|
|
37
|
+
``
|
|
38
38
|
这个需求是针对哪个平台?
|
|
39
39
|
1. Web 管理端 (fywl-ui)
|
|
40
40
|
2. APP 移动端 (Carmg-H5)
|
|
41
41
|
3. 两端都要
|
|
42
42
|
请选择 (1/2/3):
|
|
43
|
-
|
|
43
|
+
``
|
|
44
44
|
|
|
45
45
|
### 取上下文(1 次调用取全 8 段)
|
|
46
|
-
|
|
47
|
-
python "$R/.qoder/scripts/
|
|
48
|
-
|
|
46
|
+
``bash
|
|
47
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" context <业务词> --platform <web|app>
|
|
48
|
+
``
|
|
49
49
|
- 第 4 段 = 历史 PRD(防重复)
|
|
50
50
|
- 第 5 段 = 相关 API
|
|
51
51
|
- 第 8 段 = 数据库表结构+真实字段
|
|
52
|
-
- 涉及枚举字段时额外调 `
|
|
52
|
+
- 涉及枚举字段时额外调 `cap.mcp.call("query_distinct`
|
|
53
53
|
|
|
54
54
|
### 产出
|
|
55
55
|
- PRD: `workspace/members/{dev}/drafts/REQ-{YYYY}-{NNN}-{标题}.md`(13 章)
|
|
56
|
-
-
|
|
57
|
-
- 第一行必须带 `@contract` 头(platform/req-id/mode/acceptance)
|
|
56
|
+
- 原型(**可选**,见下「原型要不要画」): `workspace/members/{dev}/drafts/prototype-{feature}.html`
|
|
57
|
+
- 第一行必须带 `@contract` 头(platform/req-id/mode/acceptance/prototype)
|
|
58
|
+
|
|
59
|
+
### 原型要不要画?(融入批量确认)
|
|
60
|
+
|
|
61
|
+
**默认建议**(用户可一键改,详见 `.qoder/skills/wl-prd-full/SKILL.md` STEP 0.5):
|
|
62
|
+
- 纯规则/接口/定时/参数/计算类 → **不画**(如"出交车点检固定为总部全局规则")
|
|
63
|
+
- 含页面/菜单/表单/弹窗/详情/向导/看板/大屏 → **画**
|
|
64
|
+
- 加字段/按钮/文案/导出 → **不画**
|
|
65
|
+
- 混合(页面+规则)→ 只画页面那部分
|
|
66
|
+
|
|
67
|
+
**两端都画时**:默认只画主端一份,用户明确要求才画 2 份。
|
|
68
|
+
|
|
69
|
+
**不画时**:PRD 第 11 章写 `无({原因},经用户确认豁免)` + `@contract` 头标 `prototype: none`;
|
|
70
|
+
eval 自动跳过 A2(满分从 100 降到 70,照样 PASS);`/wl-design` `/wl-code` 据此跳过原型环节。
|
|
58
71
|
|
|
59
72
|
### 质量门禁
|
|
60
|
-
|
|
61
|
-
python "$R/.qoder/scripts/
|
|
62
|
-
|
|
73
|
+
``bash
|
|
74
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" eval <prd.md> [原型.html]
|
|
75
|
+
``
|
|
63
76
|
≥ 80% 才 PASS。完整模板见 `.qoder/templates/prd-full-template.md`。
|
|
64
77
|
|
|
65
78
|
---
|
|
@@ -89,7 +102,7 @@ python "$R/.qoder/scripts/report/eval_prd.py" <prd.md> [原型.html]
|
|
|
89
102
|
- 影响范围是否评估
|
|
90
103
|
- 非功能性需求是否覆盖
|
|
91
104
|
- ...
|
|
92
|
-
3. 跑 EVA 评分:`
|
|
105
|
+
3. 跑 EVA 评分:`python "$R/.qoder/scripts/orchestration/wlkj.py" eval <prd.md>`(wlkj.py eval 内部映射 validation/metrics/eval_prd.py)
|
|
93
106
|
4. 输出:总分 + 7 项 ✓/✗ + 改进建议
|
|
94
107
|
|
|
95
108
|
---
|
|
@@ -19,13 +19,13 @@ argument-hint: "[REQ-ID] [发布]"
|
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
# 列需求
|
|
22
|
-
python "$R/.qoder/scripts/
|
|
22
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" req
|
|
23
23
|
|
|
24
24
|
# 看某需求全貌
|
|
25
|
-
python "$R/.qoder/scripts/
|
|
25
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" req REQ-2026-001
|
|
26
26
|
|
|
27
27
|
# 发布 (promote + publish)
|
|
28
|
-
python "$R/.qoder/scripts/
|
|
28
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" req REQ-2026-001 发布
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## 结构
|
|
@@ -3,45 +3,51 @@ name: wl-search
|
|
|
3
3
|
description: "查代码/业务/API/字段/PRD + 知识图谱(影响分析/覆盖矩阵/功能画像/业务流程/多跳遍历)的唯一入口。"
|
|
4
4
|
argument-hint: "[keyword] or --api [path] or subcommand. 全系13个能力见下表"
|
|
5
5
|
auto-approve: true
|
|
6
|
-
allowed-tools: [Read, Bash
|
|
6
|
+
allowed-tools: [Read, Bash]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# /wl-search - 搜索代码 & 知识图谱
|
|
10
10
|
|
|
11
11
|
User input: $ARGUMENTS
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 执行方式(宿主无关,自动路由)
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
```python
|
|
16
|
+
from capability import resolve
|
|
17
|
+
cap = resolve()
|
|
18
|
+
result = cap.mcp.call("search_code", {"keyword": "保险", "platform": "web"})
|
|
18
19
|
```
|
|
19
|
-
> 后续脚本统一用 `python "$R/.qoder/scripts/<子包>/<脚本>.py"`(子包: kg/build/test/setup/io)或 `python "$R/.qoder/scripts/wlkj.py" <命令>`。
|
|
20
|
-
|
|
21
|
-
## 双轨:MCP 优先(仅 QoderWork)/ kg.py 兜底(全系列通用)
|
|
22
|
-
|
|
23
|
-
**QoderWork 环境**(有 `mcp__qoder-knowledge-graph`):直接调 MCP 工具,更快。
|
|
24
|
-
**其他 Qoder 载体**(IDE/Quest/CLI):跑 `python "$R/.qoder/scripts/kg/kg.py"`,功能等价。
|
|
25
|
-
|
|
26
|
-
不确定在哪个环境?先试 MCP;MCP 工具不存在就用 kg.py。
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
|
44
|
-
|
|
21
|
+
自动路由:有 MCP 走 MCP(快),无 MCP 走 wlkj.py(CLI 降级)。零宿主感知。
|
|
22
|
+
|
|
23
|
+
## ⚡ 第一步:先判断问题类型,别一上来就 search
|
|
24
|
+
|
|
25
|
+
| 问题类型 | 首选(一次到位) | ❌ 别这样 |
|
|
26
|
+
|---------|-----------------|----------|
|
|
27
|
+
| **"XX怎么实现的/怎么做的"** | `cap.mcp.call("context_pack", {"keyword": "XX", "role": "dev"})` | 不要一个个 search(会搜 5-7 次,慢费 token) |
|
|
28
|
+
| **"XX代码在哪"** | `cap.mcp.call("search_code", {"keyword": "XX"})` | 不要 context(杀鸡用牛刀) |
|
|
29
|
+
| **"改 XX 影响谁"** | `cap.mcp.call("get_impact", {"endpoint": "/XX"})` | — |
|
|
30
|
+
|
|
31
|
+
> 理解一个功能怎么做的问题,`context_pack` 一条命令拿全代码+API+字段,绝大多数情况只需 Read 2-3 个文件就够,
|
|
32
|
+
> 不用反复 search。Glob 找不到文件时用 search_code 兜底,**不准跑 find/findstr/dir /s**。
|
|
33
|
+
|
|
34
|
+
## 13 个能力(统一 cap.mcp.call 调用)
|
|
35
|
+
|
|
36
|
+
| 用户要查什么 | 调用方式 |
|
|
37
|
+
|-------------|---------|
|
|
38
|
+
| 代码在哪 / 搜关键词 | `cap.mcp.call("search_code", {"keyword": "考勤", "platform": "web"})` |
|
|
39
|
+
| API 端点 | `cap.mcp.call("search_api", {"keyword": "salary"})` |
|
|
40
|
+
| 已有 PRD(防重复造轮子) | `cap.mcp.call("search_prd", {"keyword": "保险"})` |
|
|
41
|
+
| 改某接口影响哪些页面 | `cap.mcp.call("get_impact", {"endpoint": "/asset"})` |
|
|
42
|
+
| 某函数/端点的完整关联 | `cap.mcp.call("context_360", {"symbol": "handleExport"})` |
|
|
43
|
+
| 一次取全(代码+页面+字段+API) | `cap.mcp.call("context_pack", {"keyword": "车辆", "role": "pm"})` |
|
|
44
|
+
| 哪些功能有/没测试 | `cap.mcp.call("coverage_matrix", {})` |
|
|
45
|
+
| 功能完整画像 | `cap.mcp.call("feature_overview", {"feature": "资产管理"})` |
|
|
46
|
+
| 业务流程链(几步) | `cap.mcp.call("get_workflow", {"module": "assets"})` |
|
|
47
|
+
| 多跳遍历(关联实体) | `cap.mcp.call("multi_hop", {"symbol": "资产管理", "depth": 3})` |
|
|
48
|
+
| Repo Wiki 模块文档 | `cap.mcp.call("search_wiki", {"keyword": "考勤"})` |
|
|
49
|
+
| 原型预填(真实数据) | `cap.mcp.call("fill_prototype", {"keyword": "车辆", "platform": "web"})` |
|
|
50
|
+
| 设计系统规范 | `cap.mcp.call("get_design_system", {"platform": "web"})` |
|
|
45
51
|
|
|
46
52
|
## 快速判断该用哪个
|
|
47
53
|
|
|
@@ -50,27 +56,52 @@ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
|
50
56
|
- **"哪些功能缺测试"** → `coverage`
|
|
51
57
|
- **"盘点流程有几步"** → `workflow`
|
|
52
58
|
- **"XX 谁调用了/调用链"** → `context360` 或 `hop`
|
|
53
|
-
- **写 PRD 前一次取全** → `
|
|
54
|
-
- **出原型前** → `
|
|
59
|
+
- **写 PRD 前一次取全** → `context_pack --role pm`
|
|
60
|
+
- **出原型前** → `design_system` + `fill_prototype`
|
|
55
61
|
|
|
56
|
-
##
|
|
62
|
+
## 字段/页面风格/组件
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
这些不是 MCP 工具,走 CLI 降级:
|
|
59
65
|
|
|
60
66
|
```
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
cap.mcp.call("search_code", {"keyword": "--field <字段名>"}) # 字段搜索
|
|
68
|
+
cap.mcp.call("search_code", {"keyword": "--style table"}) # 风格搜索
|
|
69
|
+
cap.mcp.call("search_code", {"keyword": "--list"}) # Top50 关键词
|
|
70
|
+
cap.mcp.call("search_code", {"keyword": "--modules"}) # 项目模块概览
|
|
71
|
+
cap.mcp.call("search_code", {"keyword": "--components"}) # 组件使用统计
|
|
66
72
|
```
|
|
67
73
|
|
|
74
|
+
## 数据库查询(真实库表结构/数据/枚举)— ⚠️ 强制先问环境
|
|
75
|
+
|
|
76
|
+
当用户意图涉及**数据库 / 表结构 / 字段 / 枚举取值 / 真实数据**,走 `cap.mcp.call("list_envs")` 等,**不走知识图谱**。
|
|
77
|
+
|
|
78
|
+
可用工具(全部带可选 `env` 参数):
|
|
79
|
+
- `cap.mcp.call("list_envs", {})` — 列出所有可用环境(**第一步必须先调这个**)
|
|
80
|
+
- `cap.mcp.call("query_schema", {"table": "t_xxx", "env": "test"})` — 表结构
|
|
81
|
+
- `cap.mcp.call("query_data", {"table": "t_xxx", "env": "test"})` — 数据
|
|
82
|
+
- `cap.mcp.call("query_distinct", {"table": "t_xxx", "column": "status", "env": "test"})` — 枚举值
|
|
83
|
+
|
|
84
|
+
### 🔒 安全红线:查库前必须先问环境(不可跳过)
|
|
85
|
+
|
|
86
|
+
**标准流程:**
|
|
87
|
+
1. **先调 `cap.mcp.call("list_envs", {})`** 拿到所有环境标签,列给用户选
|
|
88
|
+
2. **用户明确选定后**,后续工具调用都带上 `env=<用户选的标签>`
|
|
89
|
+
3. 生产环境 🔴 真实数据,仅供核对字段含义/格式,**禁止作为业务结论外传**
|
|
90
|
+
|
|
68
91
|
## 没给参数时
|
|
69
92
|
|
|
70
|
-
如果用户没给关键词/子命令,先问意图,或跑 `
|
|
93
|
+
如果用户没给关键词/子命令,先问意图,或跑 `cap.mcp.call("search_code", {"keyword": "--list"})` 列出热门关键词让用户选。
|
|
71
94
|
|
|
72
95
|
## DO NOT grep the entire codebase
|
|
73
96
|
|
|
97
|
+
🚫 **绝对禁止**用 `findstr /s`、`grep -r`、`os.walk`、`subprocess` 全盘递归扫 data/code。
|
|
98
|
+
|
|
99
|
+
**中文文案/报错溯源**(用户查的是中文短语),**唯一合法方式**:
|
|
100
|
+
```bash
|
|
101
|
+
# grep-text 走 CLI 降级(不是 MCP 工具)
|
|
102
|
+
python "$R/.qoder/scripts/orchestration/wlkj.py" kg grep-text 车辆不存在 --ext java --limit 20
|
|
103
|
+
```
|
|
104
|
+
|
|
74
105
|
## How to Use Results
|
|
75
106
|
|
|
76
107
|
1. Pick the most relevant files (2-3 max)
|
|
@@ -79,10 +110,10 @@ python "$R/.qoder/scripts/kg/search_index.py" --components # 组件使用统计
|
|
|
79
110
|
|
|
80
111
|
## Examples
|
|
81
112
|
|
|
82
|
-
- `/wl-search 考勤`
|
|
83
|
-
- `/wl-search --api salary`
|
|
84
|
-
- `/wl-search 改 /asset 影响谁`
|
|
85
|
-
- `/wl-search 哪些功能没测试`
|
|
86
|
-
- `/wl-search
|
|
87
|
-
- `/wl-search
|
|
88
|
-
- `/wl-search
|
|
113
|
+
- `/wl-search 考勤` → `cap.mcp.call("search_code", {"keyword": "考勤"})`
|
|
114
|
+
- `/wl-search --api salary` → `cap.mcp.call("search_api", {"keyword": "salary"})`
|
|
115
|
+
- `/wl-search 改 /asset 影响谁` → `cap.mcp.call("get_impact", {"endpoint": "/asset"})`
|
|
116
|
+
- `/wl-search 哪些功能没测试` → `cap.mcp.call("coverage_matrix", {})`
|
|
117
|
+
- `/wl-search t_quality_case 表结构` → 先 `list_envs()` 问环境 → `query_schema`
|
|
118
|
+
- `/wl-search 资产管理功能画像` → `cap.mcp.call("feature_overview", {"feature": "资产管理"})`
|
|
119
|
+
- `/wl-search 车辆不存在报错从哪来` → `wlkj.py kg grep-text 车辆不存在 --ext java`
|