@hupan56/wlkj 3.3.12 → 3.3.14

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 (103) hide show
  1. package/bin/cli.js +1 -23
  2. package/package.json +29 -29
  3. package/templates/qoder/agents/design-agent.md +20 -0
  4. package/templates/qoder/agents/spec-generator.md +21 -0
  5. package/templates/qoder/commands/optional/wl-spec.md +2 -12
  6. package/templates/qoder/commands/optional/wl-status.md +0 -8
  7. package/templates/qoder/commands/wl-code.md +0 -8
  8. package/templates/qoder/commands/wl-commit.md +1 -11
  9. package/templates/qoder/commands/wl-init.md +129 -129
  10. package/templates/qoder/commands/wl-prd.md +0 -24
  11. package/templates/qoder/commands/wl-search.md +11 -26
  12. package/templates/qoder/commands/wl-task.md +1 -11
  13. package/templates/qoder/commands/wl-test.md +0 -8
  14. package/templates/qoder/config.yaml +8 -3
  15. package/templates/qoder/hooks/session-start.py +365 -384
  16. package/templates/qoder/hooks/stop-eval.py +254 -383
  17. package/templates/qoder/scripts/capability/adapters/mcp.py +314 -322
  18. package/templates/qoder/scripts/capability/registry.py +248 -245
  19. package/templates/qoder/scripts/capability/registry_mcp.py +4 -10
  20. package/templates/qoder/scripts/capability/smoke_test_report.json.new +94 -0
  21. package/templates/qoder/scripts/deployment/setup/init_doctor.py +2 -6
  22. package/templates/qoder/scripts/deployment/setup/install_qoderwork.py +14 -0
  23. package/templates/qoder/scripts/deployment/setup/setup.py +2 -16
  24. package/templates/qoder/scripts/domain/integration/return_to_platform.py +2 -4
  25. package/templates/qoder/scripts/domain/integration/spec_upload.py +4 -4
  26. package/templates/qoder/scripts/domain/kg/build/build_entity_registry.py +12 -12
  27. package/templates/qoder/scripts/domain/kg/build/build_relations.py +12 -12
  28. package/templates/qoder/scripts/domain/kg/extract/asset/__init__.py +10 -0
  29. package/templates/qoder/scripts/domain/kg/extract/asset/asset_tree.py +57 -0
  30. package/templates/qoder/scripts/domain/kg/extract/asset/discussion_importer.py +62 -0
  31. package/templates/qoder/scripts/domain/kg/extract/asset/prd_importer.py +146 -0
  32. package/templates/qoder/scripts/domain/kg/extract/asset/prototype_importer.py +64 -0
  33. package/templates/qoder/scripts/domain/kg/extract/asset/returns_importer.py +52 -0
  34. package/templates/qoder/scripts/domain/kg/extract/build_goal3.py +104 -0
  35. package/templates/qoder/scripts/domain/kg/extract/build_goal4.py +55 -0
  36. package/templates/qoder/scripts/domain/kg/extract/build_goal5.py +95 -0
  37. package/templates/qoder/scripts/domain/kg/extract/db/__init__.py +8 -0
  38. package/templates/qoder/scripts/domain/kg/extract/db/data_profile.py +22 -0
  39. package/templates/qoder/scripts/domain/kg/extract/db/fk_extractor.py +55 -0
  40. package/templates/qoder/scripts/domain/kg/extract/db/schema_extractor.py +90 -0
  41. package/templates/qoder/scripts/domain/kg/extract/inference/__init__.py +9 -0
  42. package/templates/qoder/scripts/domain/kg/extract/inference/community_summarizer.py +206 -0
  43. package/templates/qoder/scripts/domain/kg/extract/inference/embed_builder.py +132 -0
  44. package/templates/qoder/scripts/domain/kg/extract/inference/naming_matcher.py +80 -0
  45. package/templates/qoder/scripts/domain/kg/extract/inference/promote.py +59 -0
  46. package/templates/qoder/scripts/domain/kg/extract/inference/recompute.py +93 -0
  47. package/templates/qoder/scripts/domain/kg/extract/inference/weak_link.py +421 -0
  48. package/templates/qoder/scripts/domain/kg/extract/mybatis/__init__.py +9 -0
  49. package/templates/qoder/scripts/domain/kg/extract/mybatis/all.py +79 -0
  50. package/templates/qoder/scripts/domain/kg/extract/mybatis/mapper_parser.py +99 -0
  51. package/templates/qoder/scripts/domain/kg/extract/mybatis/relation_builder.py +69 -0
  52. package/templates/qoder/scripts/domain/kg/extract/mybatis/sql_extractor.py +78 -0
  53. package/templates/qoder/scripts/domain/kg/extract/prd/__init__.py +8 -0
  54. package/templates/qoder/scripts/domain/kg/extract/prd/prd_chunk_embed.py +105 -0
  55. package/templates/qoder/scripts/domain/kg/extract/prd/prd_llm_extract.py +153 -0
  56. package/templates/qoder/scripts/domain/kg/extract/prd/req_anchor.py +120 -0
  57. package/templates/qoder/scripts/domain/kg/graph/kg_link_db.py +235 -0
  58. package/templates/qoder/scripts/domain/kg/graph/kg_semantic.py +5 -41
  59. package/templates/qoder/scripts/domain/kg/kg.py +0 -14
  60. package/templates/qoder/scripts/domain/kg/search/enrich_prompt.py +238 -0
  61. package/templates/qoder/scripts/domain/kg/server/perf_bench.py +197 -0
  62. package/templates/qoder/scripts/domain/kg/switch_project.py +2 -2
  63. package/templates/qoder/scripts/domain/kg/sync_repowiki.py +109 -0
  64. package/templates/qoder/scripts/domain/task/wlkj_panel.py +1348 -1503
  65. package/templates/qoder/scripts/engine/poller.py +219 -0
  66. package/templates/qoder/scripts/foundation/bootstrap.py +145 -145
  67. package/templates/qoder/scripts/orchestration/wlkj.py +189 -306
  68. package/templates/qoder/settings.json +0 -8
  69. package/templates/qoder/skills/wl-spec/SKILL.md +1 -1
  70. package/templates/qoder/commands/wl-data.md +0 -46
  71. package/templates/qoder/commands/wl-fix.md +0 -47
  72. package/templates/qoder/commands/wl-knowledge.md +0 -41
  73. package/templates/qoder/commands/wl-review.md +0 -49
  74. package/templates/qoder/contracts/insight.md +0 -55
  75. package/templates/qoder/hooks/pre-tool-use-commit.py +0 -124
  76. package/templates/qoder/scripts/foundation/io/context_cache.py +0 -94
  77. package/templates/qoder/scripts/tool_guide.md +0 -70
  78. package/templates/qoder/scripts/validation/eval/alignment_matrix.py +0 -176
  79. package/templates/qoder/scripts/validation/eval/bf2_content_fidelity.py +0 -110
  80. package/templates/qoder/scripts/validation/eval/bf2_llmjudge.py +0 -104
  81. package/templates/qoder/scripts/validation/eval/bf_score.py +0 -218
  82. package/templates/qoder/scripts/validation/eval/code_flywheel.py +0 -150
  83. package/templates/qoder/scripts/validation/eval/dispatcher_ab.py +0 -156
  84. package/templates/qoder/scripts/validation/eval/dispatcher_ab_2026-07-21.json +0 -23
  85. package/templates/qoder/scripts/validation/eval/feature_fidelity_flywheel.py +0 -143
  86. package/templates/qoder/scripts/validation/eval/gradient_matrix.py +0 -261
  87. package/templates/qoder/scripts/validation/eval/gradient_matrix_baseline_2026-07-21.json +0 -33
  88. package/templates/qoder/scripts/validation/eval/metrics_dashboard.py +0 -105
  89. package/templates/qoder/scripts/validation/eval/multi_turn_flywheel.py +0 -118
  90. package/templates/qoder/scripts/validation/eval/prd_fidelity_flywheel.py +0 -128
  91. package/templates/qoder/scripts/validation/eval/prd_flywheel.py +0 -148
  92. package/templates/qoder/scripts/validation/eval/prototype_fidelity_flywheel.py +0 -166
  93. package/templates/qoder/scripts/validation/eval/recall_flywheel.py +0 -148
  94. package/templates/qoder/scripts/validation/eval/robustness_flywheel.py +0 -139
  95. package/templates/qoder/scripts/validation/eval/speed_accuracy_flywheel.py +0 -188
  96. package/templates/qoder/scripts/validation/eval/task_flywheel.py +0 -124
  97. package/templates/qoder/scripts/validation/eval/token_flywheel.py +0 -88
  98. package/templates/qoder/scripts/validation/metrics/eval_code_ac.py +0 -177
  99. package/templates/qoder/scripts/validation/metrics/lint_cases.py +0 -170
  100. package/templates/qoder/scripts/validation/test/test_context_cache.py +0 -78
  101. package/templates/qoder/scripts/validation/test/test_lint_cases.py +0 -60
  102. package/templates/qoder/scripts/validation/test/test_pre_tool_use_commit.py +0 -70
  103. package/templates/workspace/specs/REQ-TEST-CTX/.context-cache.json +0 -1
package/bin/cli.js CHANGED
@@ -1,13 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // wlkj - workflow toolkit
3
3
 
4
- // Windows 中文乱码修复:cmd/PowerShell 默认 GBK,cli.js 输出 UTF-8 → 乱码
5
- if (process.platform === "win32") {
6
- try { execSync("chcp 65001", { stdio: "ignore" }); } catch (e) {}
7
- process.stdout.setDefaultEncoding("utf-8");
8
- process.stderr.setDefaultEncoding("utf-8");
9
- }
10
-
11
4
  const path = require("path");
12
5
  const fs = require("fs");
13
6
  const { execSync } = require("child_process");
@@ -390,7 +383,7 @@ async function doInit(name, roleArg) {
390
383
  console.log(`\n--- 自动初始化 ---`);
391
384
  const setupPath = path.join(cwd, ".qoder", "scripts", "deployment", "setup", "setup.py");
392
385
  if (fs.existsSync(setupPath)) {
393
- const setupArgs = [name, role, "--skip-cron", "--skip-qoderwork", "--skip-code"].filter(Boolean);
386
+ const setupArgs = [name, role, "--skip-cron", "--skip-qoderwork"].filter(Boolean);
394
387
  try {
395
388
  const cmd = `python "${setupPath}" ${setupArgs.map(a => `"${a}"`).join(" ")}`;
396
389
  console.log(` 运行: setup.py ${setupArgs.join(" ")}`);
@@ -450,21 +443,6 @@ async function doInit(name, roleArg) {
450
443
  }
451
444
  }
452
445
 
453
- // === 6.6. 连云平台 bind 项目(云模式:KG 在云平台,引擎调云 MCP)===
454
- if (pyCmd) {
455
- const switchScript = path.join(cwd, ".qoder", "scripts", "domain", "kg", "switch_project.py");
456
- if (fs.existsSync(switchScript)) {
457
- console.log(`\n--- 连云平台 bind 项目 ---`);
458
- console.log(` 问平台邮箱/密码 → 拉项目列表 → 选项目 → 写 mcp_config(连云)`);
459
- try {
460
- const env = { ...process.env, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1" };
461
- execSync(`${pyCmd} "${switchScript}"`, { cwd, stdio: "inherit", timeout: 180000, env });
462
- } catch (e) {
463
- console.log(` [WARN] 云 bind 未完成,可手动: python .qoder/scripts/domain/kg/switch_project.py`);
464
- }
465
- }
466
- }
467
-
468
446
  // === 7. 写版本戳 ===
469
447
  writeEngineVersion(cwd);
470
448
 
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "name": "@hupan56/wlkj",
3
- "version": "3.3.12",
4
- "description": "AI Product R&D Workflow - PRD/Prototype/Search/Task/Report",
5
- "bin": {
6
- "wlkj": "bin/cli.js"
7
- },
8
- "files": [
9
- "bin/",
10
- "templates/",
11
- "MAC-VERIFY.md"
12
- ],
13
- "keywords": [
14
- "workflow",
15
- "ai",
16
- "prd",
17
- "pipeline",
18
- "qoder",
19
- "product",
20
- "team"
21
- ],
22
- "license": "MIT",
23
- "publishConfig": {
24
- "access": "public"
25
- },
26
- "engines": {
27
- "node": ">=16"
28
- }
29
- }
1
+ {
2
+ "name": "@hupan56/wlkj",
3
+ "version": "3.3.14",
4
+ "description": "AI Product R&D Workflow - PRD/Prototype/Search/Task/Report",
5
+ "bin": {
6
+ "wlkj": "bin/cli.js"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "templates/",
11
+ "MAC-VERIFY.md"
12
+ ],
13
+ "keywords": [
14
+ "workflow",
15
+ "ai",
16
+ "prd",
17
+ "pipeline",
18
+ "qoder",
19
+ "product",
20
+ "team"
21
+ ],
22
+ "license": "MIT",
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "engines": {
27
+ "node": ">=16"
28
+ }
29
+ }
@@ -0,0 +1,20 @@
1
+ # Design Agent
2
+
3
+ ## Required: Load Context First (Pull-Based)
4
+ Load task context yourself. Run: python .qoder/scripts/orchestration/wlkj.py task current --source
5
+ Then read the PRD from the task directory.
6
+
7
+ ## Recursion Guard
8
+ You are the design-agent. Do NOT spawn another design-agent.
9
+
10
+ ## Your Role
11
+ Transform PRD into design artifacts.
12
+
13
+ ## Workflow
14
+ 1. Read PRD from task directory
15
+ 2. Analyze UI requirements
16
+ 3. Generate design artifacts to workspace/tasks/{id}/design/:
17
+ - components.json: component tree and specs
18
+ - interaction-flow.md: user flow and state transitions
19
+ 4. Review against PRD acceptance criteria
20
+ 5. Submit via /handoff to dev
@@ -0,0 +1,21 @@
1
+ # Spec Generator Agent
2
+
3
+ ## Required: Load Context First (Pull-Based)
4
+ Load task context yourself.
5
+
6
+ ## Recursion Guard
7
+ You are the spec-generator. Do NOT spawn another spec-generator.
8
+
9
+ ## Your Role
10
+ Generate technical Spec from PRD + Design.
11
+
12
+ ## Workflow
13
+ 1. Read PRD — 先找 `workspace/members/{dev}/drafts/REQ-*.md`,再找 `data/docs/prd/REQ-*.md`,最后 `workspace/specs/prd/`
14
+ 2. Read design artifacts from `workspace/tasks/{id}/design/` (若存在)
15
+ 3. Read team rules from `.qoder/skills/spec-generator/SKILL.md` + `.qoder/contracts/spec.md` (权威源);`workspace/constitution/` 有则参考
16
+ 4. Generate spec covering:
17
+ - Architecture changes
18
+ - Data model changes
19
+ - API changes
20
+ - Implementation plan
21
+ 5. Save to `workspace/specs/REQ-{ID}-{module}.spec.md` (文件名带 `.spec.md` 后缀,与 contracts/spec.md 契约一致,保证 spec→code→test 贯穿检索)
@@ -12,7 +12,7 @@ User input:
12
12
 
13
13
  ## Auto Generate Spec
14
14
  1. Read current task PRD and design artifacts
15
- 2. dispatch 到 `qoder-spec-gen` sub-agent(.qoder/agents/qoder-spec-gen.toml — 它读 spec-generator skill + spec 契约自动生成)
15
+ 2. Load .qoder/agents/spec-generator.md
16
16
  3. Generate spec.md based on PRD + Design
17
17
  4. ★ 契约头**必须**写 `status: draft`(wl-code gate 依据):
18
18
  ```markdown
@@ -26,9 +26,7 @@ User input:
26
26
  6. Notify dev to review — 提示用户审阅后回复"确认",确认后改 `status: confirmed`
27
27
  7. ★ 用户确认后,上传 spec 到平台(按 zentao_id 反查需求挂载 → 资产中心随需求可见,无需发布):
28
28
  ```bash
29
- R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
30
- PY=$(python --version >/dev/null 2>&1 && echo python || echo python3)
31
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" spec-upload <spec.md> --zentao-id <禅道story号> [--code-targets CtrlA,SvcB]
29
+ python -m domain.integration.spec_upload <spec.md> --zentao-id <禅道story号> [--code-targets CtrlA,SvcB]
32
30
  ```
33
31
  - 契约头无 `platform_spec_id` → `create_spec(zentao_id,...)` 新建 + 平台反查 Requirement 挂上 → `confirm_spec` 进 confirmed → 回写 `platform_spec_id`(幂等锚)
34
32
  - 契约头有 `platform_spec_id` → 自动走 `update_spec`(version+1,不重复建)
@@ -38,11 +36,3 @@ User input:
38
36
  ## 下一步
39
37
  - spec 已 confirmed → `/wl-code <REQ-ID>` 按 spec 严格实现(spec gate 放行)
40
38
  - 实现完 → `/wl-test` 验证 → `/wl-commit` 提交回流
41
-
42
-
43
- ## 🚨 接地铁律(防幻觉/保真,Qoder AI 必须遵守)
44
-
45
- 1. **溯源**:引用代码符号/表名/接口用**真实原名**(如 `CostApplyController`、`base_asset`),非中文描述——只引 MCP 工具(rag_search/schema_link/context_360/get_impact 等)召回的真实符号,提升可溯源性
46
- 2. **禁编**:不编造未在召回里出现的类名/表名/字段/接口;召回不足时标"待确认(知识层未召回)",**诚实优于编造**
47
- 3. **接地(数据表)**:涉及数据表/字段时,先调 MCP `schema_link`/`query_schema` 取真表真列;未召回真表禁编 t_xxx 表名+字段充数
48
- 4. **完整**:产物详尽展开(每节实质内容,不一行带过)
@@ -89,11 +89,3 @@ $PY "$R/.qoder/scripts/validation/metrics/usability_score.py" --html
89
89
  - **CLI/IDE**(NoOp 自动降级):落盘 `workspace/members/{dev}/journal/dashboard-{时间戳}.html`,输出路径供打开
90
90
 
91
91
  不用 cap.present 也能跑——上面的 Health Score 维度表本身是纯文本,富展示只是增强可视化(T244 cap.present 接入点)。
92
-
93
-
94
- ## 🚨 接地铁律(防幻觉/保真,Qoder AI 必须遵守)
95
-
96
- 1. **溯源**:引用代码符号/表名/接口用**真实原名**(如 `CostApplyController`、`base_asset`),非中文描述——只引 MCP 工具(rag_search/schema_link/context_360/get_impact 等)召回的真实符号,提升可溯源性
97
- 2. **禁编**:不编造未在召回里出现的类名/表名/字段/接口;召回不足时标"待确认(知识层未召回)",**诚实优于编造**
98
- 3. **接地(数据表)**:涉及数据表/字段时,先调 MCP `schema_link`/`query_schema` 取真表真列;未召回真表禁编 t_xxx 表名+字段充数
99
- 4. **完整**:产物详尽展开(每节实质内容,不一行带过)
@@ -216,11 +216,3 @@ cap.mcp.call("learn", {
216
216
  })
217
217
  ```
218
218
  - 至少写 1 条最有价值的认知。try/except 不阻塞。
219
-
220
-
221
- ## 🚨 接地铁律(防幻觉/保真,Qoder AI 必须遵守)
222
-
223
- 1. **溯源**:引用代码符号/表名/接口用**真实原名**(如 `CostApplyController`、`base_asset`),非中文描述——只引 MCP 工具(rag_search/schema_link/context_360/get_impact 等)召回的真实符号,提升可溯源性
224
- 2. **禁编**:不编造未在召回里出现的类名/表名/字段/接口;召回不足时标"待确认(知识层未召回)",**诚实优于编造**
225
- 3. **接地(数据表)**:涉及数据表/字段时,先调 MCP `schema_link`/`query_schema` 取真表真列;未召回真表禁编 t_xxx 表名+字段充数
226
- 4. **完整**:产物详尽展开(每节实质内容,不一行带过)
@@ -22,9 +22,7 @@ User input: $ARGUMENTS (commit message)
22
22
  7. Push to remote
23
23
  8. 回流平台:提交 + push 后执行回流,把本次 commit 沉淀到平台知识层
24
24
  ```bash
25
- R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
26
- PY=$(python --version >/dev/null 2>&1 && echo python || echo python3)
27
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" return commit --last
25
+ python -m domain.integration.return_to_platform commit --last
28
26
  ```
29
27
  - 自动取 HEAD commit(sha/message/author/时间)→ POST 平台 `/api/git/commits/record`
30
28
  - message 里的 `[#REQ-xxx]` / `[#<禅道号>]` 平台自动解析,建 commit→需求 边
@@ -41,11 +39,3 @@ Before committing, check:
41
39
  ## 下一步
42
40
  - 提交回流成功后,更新任务状态:`/wl-task finish <REQ-ID>`(标记开发完成,同步禅道)
43
41
  - 查看本次提交在需求链路的位置:平台资产中心 → 需求 → 变更史
44
-
45
-
46
- ## 🚨 接地铁律(防幻觉/保真,Qoder AI 必须遵守)
47
-
48
- 1. **溯源**:引用代码符号/表名/接口用**真实原名**(如 `CostApplyController`、`base_asset`),非中文描述——只引 MCP 工具(rag_search/schema_link/context_360/get_impact 等)召回的真实符号,提升可溯源性
49
- 2. **禁编**:不编造未在召回里出现的类名/表名/字段/接口;召回不足时标"待确认(知识层未召回)",**诚实优于编造**
50
- 3. **接地(数据表)**:涉及数据表/字段时,先调 MCP `schema_link`/`query_schema` 取真表真列;未召回真表禁编 t_xxx 表名+字段充数
51
- 4. **完整**:产物详尽展开(每节实质内容,不一行带过)
@@ -1,129 +1,129 @@
1
- ---
2
- name: wl-init
3
- description: "初始化/切换开发者身份 + 环境体检。Initialize/switch developer identity + environment health check. "
4
- argument-hint: "[name] [role]"
5
- auto-approve: true
6
- allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
7
- ---
8
-
9
- # /wl-init - One-stop Init (Developer + Environment Doctor)
10
-
11
- Usage:
12
- /wl-init - 体检环境 + 显示状态
13
- /wl-init 小王 - 切换/注册开发者 + 体检 + 自动修复
14
- /wl-init 小王 pm - 注册新开发者(带角色) + 体检 + 自动修复
15
-
16
- ## 🔧 环境自检(QoderWork 桌面端 vs Qoder IDE/CLI)
17
-
18
- **先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
19
- ```bash
20
- R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
21
- PY=$(python --version >/dev/null 2>&1 && echo python || echo python3)
22
- ```
23
- > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。后续脚本统一用 `$PY "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
24
-
25
- ## Engine: init_doctor.py (幂等, 增量, 永不重头再来)
26
-
27
- > **鲁棒性保证**:doctor 每项检查独立,**单项失败不阻塞其它项**;无 git 时优雅降级(团队同步/克隆禁用,但本地 PRD/搜索/任务/报告仍可用)。
28
- > **退出码**:`0` = 全部健康,`1` = 有未解决问题(`--fix` 能修的已自动修)。AI 据此判断"是否可直接开工"。
29
-
30
- ### Case 1: /wl-init (no arguments)
31
- ```bash
32
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" doctor 2>/dev/null || python3 "$R/.qoder/scripts/orchestration/wlkj.py" doctor
33
- ```
34
- Report the doctor's findings to the user in friendly language.
35
- If it found fixable issues, ask: "发现 N 个问题,要我自动修复吗?"
36
- then run with --fix.
37
-
38
- ### Case 2/3: /wl-init 小王 [pm]
39
- ```bash
40
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" doctor 2>/dev/null || python3 "$R/.qoder/scripts/orchestration/wlkj.py" doctor --fix 小王 [pm]
41
- ```
42
- This single command does ALL of:
43
- 1. 注册/切换开发者 (.qoder/.developer, key=value 格式) + 个人空间目录
44
- 2. 拉取团队最新 (team_sync pull - 拿到别人的 PRD 和最新知识图谱)
45
- 3. 克隆缺失的源码仓库 (按 config.yaml git_sync.projects)
46
- 4. 知识图谱: 7天内新鲜->跳过 / 过期->增量同步 / 缺失->全量构建(仅首次)
47
- 5. 校验风格约束文件 + PRD 模板
48
- 6. 检查周五自动构建状态, 给出本系统的设置命令
49
-
50
- After doctor finishes:
51
- - init_developer auto-registers identity (member.json + signing key)
52
- - No separate "team.py add" needed anymore
53
-
54
- ## Incremental Guarantee (为什么不会重头再来)
55
-
56
- | 状态 | 行为 |
57
- |------|------|
58
- | 本周已 init 过 / 周五任务跑过 | 索引新鲜(≤7天) -> 全部跳过, 秒级完成 |
59
- | 周五任务没跑/失效 | 索引过期 -> git diff 增量更新, 只处理变更文件 |
60
-
61
- ## 🔗 平台项目绑定(60 人各用各的项目)
62
-
63
- **每个开发者绑定自己的项目。** `/wl-init` 时选择 → 拉 token → 写 mcp_config.json。
64
- **切换项目 = 重跑 `/wl-init` 选另一个。** 60 人各自选自己的项目,token 绑定到项目,知识层自动隔离。
65
-
66
- ### 已绑定?(探测多宿主路径)
67
- ```bash
68
- grep -l WLKJ_PROJECT_ID "$R/.qoder/mcp_config.json" 2>/dev/null && echo "已绑定" || echo "未绑定"
69
- ```
70
-
71
- ### 未绑定或要切换?一行命令:
72
- ```bash
73
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" switch-project
74
- ```
75
- 脚本会:
76
- 1. 问邮箱+密码(或用 --email/--pw 参数)
77
- 2. 连平台 `POST /api/auth/bind` 拉项目列表
78
- 3. 列出你的所有项目,选一个
79
- 4. 自动写 mcp_config.json(含该项目的 token + project_id)
80
-
81
- 非交互模式(CI/自动化):
82
- ```bash
83
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" switch-project --email a@b.c --pw xxx --project-uuid <UUID>
84
- ```
85
-
86
- **之后所有命令自动用该项目的知识层、token、回流地址。不同人选不同项目 = 完全隔离。**
87
- | 全新机器 | 克隆仓库 + 全量构建一次, 之后永远增量 |
88
- | 团队其他人已更新图谱 | team_sync pull 直接拿到, 本机不用构建 |
89
-
90
- ## .developer File Format (MANDATORY)
91
-
92
- ALWAYS write `.qoder/.developer` in key=value format:
93
- ```
94
- name=小王
95
- role=pm
96
- initialized_at=2026-06-12T10:00:00
97
- ```
98
- Do NOT use `name: value` style. (Parsers accept both for legacy files,
99
- but new writes must use `=`.)
100
-
101
- ## Git Author Check
102
-
103
- The doctor reports if `git config user.name` differs from the developer
104
- name (it breaks /wl-report's commit statistics). If the user agrees,
105
- run: `git config user.name {name}`. Do not change it without confirmation.
106
-
107
- ## Status Display
108
- After any operation, show:
109
- ```
110
- Developer: 小王 (pm)
111
- Team: 3 members (1 PM, 2 Dev)
112
- Active tasks: 2 (1 in progress, 1 draft)
113
- 知识图谱: 2 天前更新 (新鲜)
114
- ```
115
-
116
- ## Safety Rules
117
- - NEVER delete workspace/ content
118
- - NEVER overwrite member.json or task.json
119
- - Full index build ONLY when index is completely missing (doctor handles this)
120
-
121
- ## 产品常踩的坑(遇到时这样解释,别让产品卡住)
122
-
123
- | 现象 | 原因 | 怎么说 / 怎么办 |
124
- |------|------|----------------|
125
- | `/wl-init --fix` 卡在第 4 项几分钟 | 正在 clone 大源码仓库(fywl-ics 8973 文件) | 告诉用户"首次克隆大仓库要几分钟,属正常,耐心等"。clone 失败(网络/权限)只影响"搜索真实代码",本地 PRD/任务/报告不受影响 |
126
- | 搜代码总返回 0 结果 / 生成原型字段全空 | `config.yaml` 的 `platforms.{xx}.project` 写的项目名在 `data/code/` 下不存在(管理员改了 git_sync URL 忘改 platforms) | doctor 第 4 项会报 `platforms.X.project = '...' 但无此目录`。让管理员核对 config.yaml 的 platforms 映射 |
127
- | `git user.name` 与开发者名不一致警告 | 影响后续 /wl-report 统计 + push 门禁 | doctor 已自动用 `--fix` 修正本仓库 git config。用户未带 `--fix` 时提示重跑 |
128
- | 没装 git | doctor 第 1 项报 WARN | 不阻塞:本地 PRD/搜索/任务/报告仍可用,只有团队同步/克隆禁用 |
129
- | 搜出来的代码是旧的 | 知识图谱 >7 天未更新 | doctor 第 5 项会增量同步,`--fix` 自动跑 |
1
+ ---
2
+ name: wl-init
3
+ description: "初始化/切换开发者身份 + 环境体检。Initialize/switch developer identity + environment health check. "
4
+ argument-hint: "[name] [role]"
5
+ auto-approve: true
6
+ allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
7
+ ---
8
+
9
+ # /wl-init - One-stop Init (Developer + Environment Doctor)
10
+
11
+ Usage:
12
+ /wl-init - 体检环境 + 显示状态
13
+ /wl-init 小王 - 切换/注册开发者 + 体检 + 自动修复
14
+ /wl-init 小王 pm - 注册新开发者(带角色) + 体检 + 自动修复
15
+
16
+ ## 🔧 环境自检(QoderWork 桌面端 vs Qoder IDE/CLI)
17
+
18
+ **先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
19
+ ```bash
20
+ R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
21
+ PY=$(python --version >/dev/null 2>&1 && echo python || echo python3)
22
+ ```
23
+ > `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。后续脚本统一用 `$PY "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
24
+
25
+ ## Engine: init_doctor.py (幂等, 增量, 永不重头再来)
26
+
27
+ > **鲁棒性保证**:doctor 每项检查独立,**单项失败不阻塞其它项**;无 git 时优雅降级(团队同步/克隆禁用,但本地 PRD/搜索/任务/报告仍可用)。
28
+ > **退出码**:`0` = 全部健康,`1` = 有未解决问题(`--fix` 能修的已自动修)。AI 据此判断"是否可直接开工"。
29
+
30
+ ### Case 1: /wl-init (no arguments)
31
+ ```bash
32
+ $PY "$R/.qoder/scripts/orchestration/wlkj.py" doctor 2>/dev/null || python3 "$R/.qoder/scripts/orchestration/wlkj.py" doctor
33
+ ```
34
+ Report the doctor's findings to the user in friendly language.
35
+ If it found fixable issues, ask: "发现 N 个问题,要我自动修复吗?"
36
+ then run with --fix.
37
+
38
+ ### Case 2/3: /wl-init 小王 [pm]
39
+ ```bash
40
+ $PY "$R/.qoder/scripts/orchestration/wlkj.py" doctor 2>/dev/null || python3 "$R/.qoder/scripts/orchestration/wlkj.py" doctor --fix 小王 [pm]
41
+ ```
42
+ This single command does ALL of:
43
+ 1. 注册/切换开发者 (.qoder/.developer, key=value 格式) + 个人空间目录
44
+ 2. 拉取团队最新 (team_sync pull - 拿到别人的 PRD 和最新知识图谱)
45
+ 3. 克隆缺失的源码仓库 (按 config.yaml git_sync.projects)
46
+ 4. 知识图谱: 7天内新鲜->跳过 / 过期->增量同步 / 缺失->全量构建(仅首次)
47
+ 5. 校验风格约束文件 + PRD 模板
48
+ 6. 检查周五自动构建状态, 给出本系统的设置命令
49
+
50
+ After doctor finishes:
51
+ - init_developer auto-registers identity (member.json + signing key)
52
+ - No separate "team.py add" needed anymore
53
+
54
+ ## Incremental Guarantee (为什么不会重头再来)
55
+
56
+ | 状态 | 行为 |
57
+ |------|------|
58
+ | 本周已 init 过 / 周五任务跑过 | 索引新鲜(≤7天) -> 全部跳过, 秒级完成 |
59
+ | 周五任务没跑/失效 | 索引过期 -> git diff 增量更新, 只处理变更文件 |
60
+
61
+ ## 🔗 平台项目绑定(60 人各用各的项目)
62
+
63
+ **每个开发者绑定自己的项目。** `/wl-init` 时选择 → 拉 token → 写 mcp_config.json。
64
+ **切换项目 = 重跑 `/wl-init` 选另一个。** 60 人各自选自己的项目,token 绑定到项目,知识层自动隔离。
65
+
66
+ ### 已绑定?(探测多宿主路径)
67
+ ```bash
68
+ grep -l WLKJ_PROJECT_ID "$R/.qoder/mcp_config.json" 2>/dev/null && echo "已绑定" || echo "未绑定"
69
+ ```
70
+
71
+ ### 未绑定或要切换?一行命令:
72
+ ```bash
73
+ $PY "$R/.qoder/scripts/domain/kg/switch_project.py"
74
+ ```
75
+ 脚本会:
76
+ 1. 问邮箱+密码(或用 --email/--pw 参数)
77
+ 2. 连平台 `POST /api/auth/bind` 拉项目列表
78
+ 3. 列出你的所有项目,选一个
79
+ 4. 自动写 mcp_config.json(含该项目的 token + project_id)
80
+
81
+ 非交互模式(CI/自动化):
82
+ ```bash
83
+ $PY "$R/.qoder/scripts/domain/kg/switch_project.py" --email a@b.c --pw xxx --project-uuid <UUID>
84
+ ```
85
+
86
+ **之后所有命令自动用该项目的知识层、token、回流地址。不同人选不同项目 = 完全隔离。**
87
+ | 全新机器 | 克隆仓库 + 全量构建一次, 之后永远增量 |
88
+ | 团队其他人已更新图谱 | team_sync pull 直接拿到, 本机不用构建 |
89
+
90
+ ## .developer File Format (MANDATORY)
91
+
92
+ ALWAYS write `.qoder/.developer` in key=value format:
93
+ ```
94
+ name=小王
95
+ role=pm
96
+ initialized_at=2026-06-12T10:00:00
97
+ ```
98
+ Do NOT use `name: value` style. (Parsers accept both for legacy files,
99
+ but new writes must use `=`.)
100
+
101
+ ## Git Author Check
102
+
103
+ The doctor reports if `git config user.name` differs from the developer
104
+ name (it breaks /wl-report's commit statistics). If the user agrees,
105
+ run: `git config user.name {name}`. Do not change it without confirmation.
106
+
107
+ ## Status Display
108
+ After any operation, show:
109
+ ```
110
+ Developer: 小王 (pm)
111
+ Team: 3 members (1 PM, 2 Dev)
112
+ Active tasks: 2 (1 in progress, 1 draft)
113
+ 知识图谱: 2 天前更新 (新鲜)
114
+ ```
115
+
116
+ ## Safety Rules
117
+ - NEVER delete workspace/ content
118
+ - NEVER overwrite member.json or task.json
119
+ - Full index build ONLY when index is completely missing (doctor handles this)
120
+
121
+ ## 产品常踩的坑(遇到时这样解释,别让产品卡住)
122
+
123
+ | 现象 | 原因 | 怎么说 / 怎么办 |
124
+ |------|------|----------------|
125
+ | `/wl-init --fix` 卡在第 4 项几分钟 | 正在 clone 大源码仓库(fywl-ics 8973 文件) | 告诉用户"首次克隆大仓库要几分钟,属正常,耐心等"。clone 失败(网络/权限)只影响"搜索真实代码",本地 PRD/任务/报告不受影响 |
126
+ | 搜代码总返回 0 结果 / 生成原型字段全空 | `config.yaml` 的 `platforms.{xx}.project` 写的项目名在 `data/code/` 下不存在(管理员改了 git_sync URL 忘改 platforms) | doctor 第 4 项会报 `platforms.X.project = '...' 但无此目录`。让管理员核对 config.yaml 的 platforms 映射 |
127
+ | `git user.name` 与开发者名不一致警告 | 影响后续 /wl-report 统计 + push 门禁 | doctor 已自动用 `--fix` 修正本仓库 git config。用户未带 `--fix` 时提示重跑 |
128
+ | 没装 git | doctor 第 1 项报 WARN | 不阻塞:本地 PRD/搜索/任务/报告仍可用,只有团队同步/克隆禁用 |
129
+ | 搜出来的代码是旧的 | 知识图谱 >7 天未更新 | doctor 第 5 项会增量同步,`--fix` 自动跑 |
@@ -23,11 +23,6 @@ User input: $ARGUMENTS
23
23
  | 生成 PRD 正文 | **Qoder AI** | 宿主 AI 比我们调 qwen-plus 更强 |
24
24
  | 写文件 | **Qoder Write** | 原生文件操作 |
25
25
 
26
- ## 🚨 工具接口铁律(见 tool_guide · 会话已注入精简版)
27
-
28
- **单一信源** `.qoder/scripts/tool_guide.md`(SessionStart 已注入精简版:repo_root 定位 / 三套名 wlkj·kg·MCP 互通 / 中文歧义词提炼 / 优先级口诀)。需完整三套名映射表或歧义词清单时 Read 它。
29
- **两条红线常记**:① 三套名字都认(`search`/`semantic`/`context`),别因"未知子命令"慌张;② 禁 `find data/code` / `grep -r` 找模块——那是知识层 search 的活,手动做=思考链跑飞;只有 search 换词仍返 0 或已定位到具体文件时才 Grep/Read。
30
-
31
26
  ## 🧠 Planning Agent(完整模式强制前置 · 非建议)
32
27
 
33
28
  > ⚠️ **完整模式必须先 Planning 再生成**(不再是"建议")。
@@ -137,12 +132,7 @@ if schema and schema.get("columns"):
137
132
  ```
138
133
  等价 CLI(脚本兜底):
139
134
  ```bash
140
- # ★ 有 REQ-ID 用 ctx-cache:PRD→spec→code 链路同 REQ 复用上下文(T1.3,省 2 次往返)
141
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" ctx-cache <REQ-ID> <业务词> --platform <web|app>
142
- # 无 REQ-ID / 首次取:普通 context
143
135
  $PY "$R/.qoder/scripts/orchestration/wlkj.py" context <业务词> --platform <web|app>
144
- # PRD/spec 改动后失效该 REQ 缓存重来:
145
- $PY "$R/.qoder/scripts/orchestration/wlkj.py" ctx-cache <REQ-ID> --clear
146
136
  ```
147
137
  - 第 4 段 = 历史 PRD(防重复)
148
138
  - 第 5 段 = 相关 API
@@ -181,20 +171,6 @@ $PY "$R/.qoder/scripts/orchestration/wlkj.py" eval <prd.md> [原型.html]
181
171
  ```
182
172
  ≥ 80% 才 PASS。完整模板见 `.qoder/templates/prd-full-template.md`。
183
173
 
184
- ### 业务保真打分(接真命令产物 · BF1/BF2)
185
-
186
- > EVA 结构分(章齐)≠业务保真。PRD 出来后打业务保真分:产物是不是真 ICS 业务(真表/真写法)。
187
- ```python
188
- from capability import resolve
189
- cap = resolve()
190
- # BF1 schema保真(提的表是真 ICS 业务表) + BF2 内容保真(LLM-judge vs 真 PRD, 是不是 ICS 写法非通用文)
191
- r = cap.mcp.call("bf_score", {"kind": "prd", "content": "<PRD 正文>", "feature": "<业务主题如 保险>"})
192
- # → BF1_schema.score(目标≥0.85) + BF2_content.score(目标≥4/5)
193
- ```
194
- - BF1 低 → PRD 提了编造/非 ICS 表 → 补真表(query_schema/db_tables)。
195
- - BF2 低 → 内容是通用产品文非 ICS 写法 → 参考 rag_search(kind=prd) 真 PRD 范本重写。
196
- - 原型保真(BF3 组件/BF4 颜色):`cap.mcp.call("bf_score", {"kind":"proto","content":"<原型 HTML>"})` → 用真 fywl-ui 设计系统核。
197
-
198
174
  ---
199
175
 
200
176
  ## 快速模式(6 章 Mini-PRD)
@@ -20,27 +20,20 @@ result = cap.mcp.call("rag_search", {"query": "车辆保养", "top_k": 8})
20
20
 
21
21
  自动路由:有 MCP 走 MCP(直连平台知识层,快),无 MCP 走 wlkj.py(CLI 降级)。零宿主感知。
22
22
 
23
- ## 🚨 接口铁律(见 tool_guide · 会话已注入精简版)
23
+ ## 第一步:先判断问题类型,选对检索通道(3 路检索)
24
24
 
25
- **单一信源** `.qoder/scripts/tool_guide.md`(SessionStart 已注入精简版:repo_root 定位 / 三套名 wlkj·kg·MCP 互通 / 中文歧义词提炼 / 优先级口诀)。需完整三套名映射表或歧义词清单时 Read 它。
26
- **两条红线常记**:① 三套名字都认(`search`/`semantic`/`context`/`impact`),别因"未知子命令"慌;② 禁 `find`/`grep -r`/`findstr /s` 全盘扫 `data/code`——那是 search 的活,手动做=思考链跑飞。
25
+ **核心升级:本命令有 3 路检索,按问题类型选最合适的一路(不是无脑 search_code)。**
27
26
 
27
+ | 问题类型 | 首选检索通道 | 为什么 |
28
+ |---------|-------------|--------|
29
+ | **"车辆保养"相关的代码/字段/API**(语义找相关,词不必一样) | `rag_search` 语义召回 | 能找到"维修记录"即使没共享词,召回最全 |
30
+ | **"这个功能的业务流程是什么 / 整体怎么运转"**(全局问答) | `ask_corpus` GraphRAG 问答 | 用社区摘要直接答,不是堆代码片段 |
31
+ | **"handleExport 这个符号在哪定义/调用"**(精确符号定位) | `search_code` 关键词 | 精确命中,找特定符号最快 |
32
+ | **"XX怎么实现的/怎么做的"**(一次取全代码+API+字段) | `context_pack` | 一条命令拿全 8 段上下文 |
33
+ | **"改 XX 影响谁"** | `get_impact` | 影响分析专用 |
28
34
 
29
- ## 第一步:确定性路由(按顺序匹配第一个命中信号,零猜测)
30
-
31
- **差模型也走得对:逐条检查 `$ARGUMENTS`,第一个命中的信号决定检索通道——不要"判断问题类型",按表查。**
32
-
33
- | # | 信号(`$ARGUMENTS` 含这些词) | 走这个通道(直达,先调一次) |
34
- |---|---|---|
35
- | 1 | "影响谁" / "改 XX 影响" / "波及" | `get_impact`(影响分析) |
36
- | 2 | "表结构" / "字段" / "枚举" / "真实数据" / "查库" | DB 通道:**先 `list_envs` 问环境**(见下「数据库查询」) |
37
- | 3 | "哪些没测" / "覆盖" / "盲区" / "测试矩阵" | `coverage_matrix` |
38
- | 4 | "业务流程" / "整体怎么运转" / "是干嘛的" | `ask_corpus`(GraphRAG 问答),再叠 `rag_search` 补事实 |
39
- | 5 | "盘点" / "有哪些代码" / "一次取全" | `context_pack`(8 段一次拿全) |
40
- | 6 | 精确符号(camelCase / 下划线 / 路径,如 `handleExport`、`/asset`) | `search_code`(精确关键词) |
41
- | 7 | **(以上都没命中)默认** | **`rag_search`(语义召回最全,top_k=8)** |
42
-
43
- > **铁律**:理解/盘点类问题默认 `rag_search`(语义召回最全,能找到没共享词的相关代码,如"车辆保养"→"维修记录");只在精确找符号时用 `search_code`;Glob 找不到文件用 `search_code` 兜底,**不准 find/findstr/dir /s 全盘扫**。
35
+ > **顺序铁律**:理解/盘点类问题,**先 rag_search(语义召回最全)**;有"整体流程/业务怎么运转"的全局问题,**再补 ask_corpus(GraphRAG 答案级)**;只在精确找某个符号/特定字符串时才用 search_code。
36
+ > Glob 找不到文件时用 search_code 兜底,**不准跑 find/findstr/dir /s**。
44
37
 
45
38
  ### 三路检索详解(RAG 升级核心)
46
39
 
@@ -213,11 +206,3 @@ $PY "$R/.qoder/scripts/orchestration/wlkj.py" kg grep-text 车辆不存在 --ext
213
206
  - `/wl-search t_quality_case 表结构` → 先 `list_envs()` 问环境 → `query_schema`
214
207
  - `/wl-search 资产管理功能画像` → `cap.mcp.call("feature_overview", {"feature": "资产管理"})`
215
208
  - `/wl-search 车辆不存在报错从哪来` → `wlkj.py kg grep-text 车辆不存在 --ext java`
216
-
217
-
218
- ## 🚨 接地铁律(防幻觉/保真,Qoder AI 必须遵守)
219
-
220
- 1. **溯源**:引用代码符号/表名/接口用**真实原名**(如 `CostApplyController`、`base_asset`),非中文描述——只引 MCP 工具(rag_search/schema_link/context_360/get_impact 等)召回的真实符号,提升可溯源性
221
- 2. **禁编**:不编造未在召回里出现的类名/表名/字段/接口;召回不足时标"待确认(知识层未召回)",**诚实优于编造**
222
- 3. **接地(数据表)**:涉及数据表/字段时,先调 MCP `schema_link`/`query_schema` 取真表真列;未召回真表禁编 t_xxx 表名+字段充数
223
- 4. **完整**:产物详尽展开(每节实质内容,不一行带过)
@@ -35,9 +35,7 @@ PY=$(python --version >/dev/null 2>&1 && echo python || echo python3)
35
35
 
36
36
  禅道是**每人一个账号**(凭据在 `workspace/members/{我}/.private/secrets/zentao.env`,gitignore),归属靠 member.json 的 `zentao_account` 映射 + 工具默认行为兜底:
37
37
 
38
- - **看任务**:`my_workbench` / `list_my_tasks` / `list_execution_tasks` **默认只返回指派给我的**(assignedTo=我),不会看到队友。要看全队排期才传 `all=true`。本地流最快,优先走它。
39
- - **看我的活**:本地 `qw_mcp_call("my_workbench")` **优先**(快);本地不可得(无凭据/进程没起)再降级平台 `cap.mcp.call("get_my_zentao_panel")`(凭据走平台 per-user 配置,云防火墙时 `get_zentao_creds` 取凭据本机直连)。
40
- - **Bug→需求反查**:`cap.mcp.call("bug_trace", {"bug_id": X})` 查"这个 Bug 是哪个需求引入的"。
38
+ - **看任务**:`my_workbench` / `list_my_tasks` / `list_execution_tasks` **默认只返回指派给我的**(assignedTo=我),不会看到队友。要看全队排期才传 `all=true`。
41
39
  - **空账号直接拒绝**:member.json 没配 `zentao_account` 时,"看我的"工具返回 `🚫 未识别禅道身份`(不再静默降级返回全队)。原样转述,引导 `/wl-init`。
42
40
  - **改任务前必校验**:start/finish/assign/update 拿到 task_id 后,**先 `get_task(id)` 看 assignedTo**:
43
41
  - `assignedTo == 我` → 正常执行;
@@ -617,11 +615,3 @@ prd ──create(带REQ-ID)──→ task ──start──→ code/test ──f
617
615
  ```
618
616
 
619
617
  > 完整执行规则见 `.qoder/skills/wl-task/SKILL.md`(Quest/QoderWork 自然语言入口)。
620
-
621
-
622
- ## 🚨 接地铁律(防幻觉/保真,Qoder AI 必须遵守)
623
-
624
- 1. **溯源**:引用代码符号/表名/接口用**真实原名**(如 `CostApplyController`、`base_asset`),非中文描述——只引 MCP 工具(rag_search/schema_link/context_360/get_impact 等)召回的真实符号,提升可溯源性
625
- 2. **禁编**:不编造未在召回里出现的类名/表名/字段/接口;召回不足时标"待确认(知识层未召回)",**诚实优于编造**
626
- 3. **接地(数据表)**:涉及数据表/字段时,先调 MCP `schema_link`/`query_schema` 取真表真列;未召回真表禁编 t_xxx 表名+字段充数
627
- 4. **完整**:产物详尽展开(每节实质内容,不一行带过)
@@ -154,11 +154,3 @@ JUnit 测试(Mock + MockMvc,Given-When-Then)→ 输出 `tests/{package}/{C
154
154
  ## 报告
155
155
  - quick:用例表 + 执行结果(pass/fail),全过建议继续别的,失败列原因
156
156
  - browser:同上 + 建议修复重跑或 `/wl-commit`
157
-
158
-
159
- ## 🚨 接地铁律(防幻觉/保真,Qoder AI 必须遵守)
160
-
161
- 1. **溯源**:引用代码符号/表名/接口用**真实原名**(如 `CostApplyController`、`base_asset`),非中文描述——只引 MCP 工具(rag_search/schema_link/context_360/get_impact 等)召回的真实符号,提升可溯源性
162
- 2. **禁编**:不编造未在召回里出现的类名/表名/字段/接口;召回不足时标"待确认(知识层未召回)",**诚实优于编造**
163
- 3. **接地(数据表)**:涉及数据表/字段时,先调 MCP `schema_link`/`query_schema` 取真表真列;未召回真表禁编 t_xxx 表名+字段充数
164
- 4. **完整**:产物详尽展开(每节实质内容,不一行带过)