@hupan56/wlkj 3.1.3 → 3.1.4
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/package.json +1 -1
- package/templates/qoder/commands/optional/wl-insight.md +1 -1
- package/templates/qoder/commands/optional/wl-report.md +2 -2
- package/templates/qoder/commands/optional/wl-status.md +1 -1
- package/templates/qoder/commands/wl-code.md +1 -1
- package/templates/qoder/commands/wl-design.md +2 -0
- package/templates/qoder/commands/wl-init.md +1 -1
- package/templates/qoder/commands/wl-prd.md +4 -0
- package/templates/qoder/commands/wl-req.md +3 -0
- package/templates/qoder/commands/wl-search.md +2 -0
- package/templates/qoder/commands/wl-task.md +1 -1
- package/templates/qoder/commands/wl-test.md +1 -1
- package/templates/qoder/scripts/deployment/setup/repo_root.py +17 -4
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@ User input: $ARGUMENTS
|
|
|
23
23
|
|
|
24
24
|
**先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
25
25
|
```bash
|
|
26
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
26
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
27
27
|
```
|
|
28
28
|
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
29
29
|
|
|
@@ -14,7 +14,7 @@ User input: $ARGUMENTS
|
|
|
14
14
|
|
|
15
15
|
**先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
16
16
|
```bash
|
|
17
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
17
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
18
18
|
```
|
|
19
19
|
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`;所有仓库内相对路径(workspace/、data/code/)都前置 `"$R/"`。
|
|
20
20
|
|
|
@@ -38,7 +38,7 @@ If no developer is set, refuse and say "Run /wl-init first".
|
|
|
38
38
|
### ⚡ Fast Path:一次拿全(必须先跑,禁止逐个 cat/ls/git log)
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
41
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
42
42
|
python "$R/.qoder/scripts/orchestration/wlkj.py" report-snapshot "$R" # 日报(今天)
|
|
43
43
|
python "$R/.qoder/scripts/orchestration/wlkj.py" report-snapshot "$R" --days 7 # 周报(近7天)
|
|
44
44
|
```
|
|
@@ -14,7 +14,7 @@ User input: $ARGUMENTS (default: show current status)
|
|
|
14
14
|
|
|
15
15
|
**先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
16
16
|
```bash
|
|
17
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
17
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
18
18
|
```
|
|
19
19
|
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`;仓库内相对路径都前置 `"$R/"`。
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ User input: $ARGUMENTS
|
|
|
14
14
|
|
|
15
15
|
**先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
16
16
|
```bash
|
|
17
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
17
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
18
18
|
```
|
|
19
19
|
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
20
20
|
|
|
@@ -120,6 +120,8 @@ cap.mcp.call("context_pack", {"keyword": "<功能名>", "platform": "web"})
|
|
|
120
120
|
## 埋点(评审完成后)
|
|
121
121
|
|
|
122
122
|
评审输出后,记录到 learning:
|
|
123
|
+
> 先定位仓库根 `R`(Mac 只有 python3, 两个都试):
|
|
124
|
+
> `R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.`
|
|
123
125
|
```bash
|
|
124
126
|
python "$R/.qoder/scripts/orchestration/wlkj.py" learn record review_done "{\"target\":\"$feature\",\"result\":\"$pass_or_issues\"}"
|
|
125
127
|
```
|
|
@@ -17,7 +17,7 @@ Usage:
|
|
|
17
17
|
|
|
18
18
|
**先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
19
19
|
```bash
|
|
20
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
20
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
21
21
|
```
|
|
22
22
|
> `repo_root.py` 从 `~/.qoderwork/mcp.json` 反推仓库根;失败回退 `.`(IDE/CLI 工作目录即仓库根)。后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
23
23
|
|
|
@@ -43,6 +43,10 @@ User input: $ARGUMENTS
|
|
|
43
43
|
``
|
|
44
44
|
|
|
45
45
|
### 取上下文(1 次调用取全 8 段)
|
|
46
|
+
先定位仓库根(Mac 只有 python3, 两个都试):
|
|
47
|
+
``bash
|
|
48
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
49
|
+
``
|
|
46
50
|
``bash
|
|
47
51
|
python "$R/.qoder/scripts/orchestration/wlkj.py" context <业务词> --platform <web|app>
|
|
48
52
|
``
|
|
@@ -17,6 +17,9 @@ argument-hint: "[REQ-ID] [发布]"
|
|
|
17
17
|
|
|
18
18
|
## 实现层
|
|
19
19
|
|
|
20
|
+
> 先定位仓库根 `R`(Mac 只有 python3, 两个都试; 失败回退 `.` 即当前工作目录):
|
|
21
|
+
> `R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.`
|
|
22
|
+
|
|
20
23
|
```bash
|
|
21
24
|
# 列需求
|
|
22
25
|
python "$R/.qoder/scripts/orchestration/wlkj.py" req
|
|
@@ -97,6 +97,8 @@ cap.mcp.call("search_code", {"keyword": "--components"}) # 组件使用
|
|
|
97
97
|
🚫 **绝对禁止**用 `findstr /s`、`grep -r`、`os.walk`、`subprocess` 全盘递归扫 data/code。
|
|
98
98
|
|
|
99
99
|
**中文文案/报错溯源**(用户查的是中文短语),**唯一合法方式**:
|
|
100
|
+
> 先定位仓库根 `R`(Mac 只有 python3, 两个都试):
|
|
101
|
+
> `R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.`
|
|
100
102
|
```bash
|
|
101
103
|
# grep-text 走 CLI 降级(不是 MCP 工具)
|
|
102
104
|
python "$R/.qoder/scripts/orchestration/wlkj.py" kg grep-text 车辆不存在 --ext java --limit 20
|
|
@@ -19,7 +19,7 @@ User input: $ARGUMENTS
|
|
|
19
19
|
|
|
20
20
|
**先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
21
21
|
```bash
|
|
22
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
22
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
23
23
|
```
|
|
24
24
|
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
25
25
|
|
|
@@ -16,7 +16,7 @@ User input: $ARGUMENTS
|
|
|
16
16
|
|
|
17
17
|
**先确定仓库根 R**(QoderWork 桌面端工作目录不是仓库根,相对路径会失效):
|
|
18
18
|
```bash
|
|
19
|
-
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
19
|
+
R=$(python ~/.qoderwork/repo_root.py 2>/dev/null || python3 ~/.qoderwork/repo_root.py 2>/dev/null) || R=.
|
|
20
20
|
```
|
|
21
21
|
> 后续脚本统一用 `python "$R/.qoder/scripts/orchestration/wlkj.py" <命令>`。
|
|
22
22
|
|
|
@@ -64,11 +64,17 @@ def find_repo_root():
|
|
|
64
64
|
here = parent
|
|
65
65
|
|
|
66
66
|
# 方法4: 本脚本所在位置(若它被放到仓库 .qoder/scripts/ 下)
|
|
67
|
+
# ⚠ 仅当脚本真在 <repo>/.qoder/scripts/ 结构内才成立。
|
|
68
|
+
# 安装到 ~/.qoderwork/repo_root.py 的副本不能走这步 ——
|
|
69
|
+
# s 上三级会解析到用户主目录的父目录(非仓库)。用目录名校验避免误判。
|
|
67
70
|
try:
|
|
68
71
|
s = os.path.abspath(__file__)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
s_dir = os.path.dirname(s)
|
|
73
|
+
# 校验: 本脚本是否真在 .../<repo>/.qoder/scripts/ 内
|
|
74
|
+
if os.path.basename(s_dir) == 'scripts' and os.path.basename(os.path.dirname(s_dir)) == '.qoder':
|
|
75
|
+
root = os.path.dirname(os.path.dirname(s_dir))
|
|
76
|
+
if os.path.isdir(os.path.join(root, '.qoder', 'scripts')):
|
|
77
|
+
return root
|
|
72
78
|
except Exception:
|
|
73
79
|
pass
|
|
74
80
|
|
|
@@ -78,7 +84,14 @@ def find_repo_root():
|
|
|
78
84
|
def main():
|
|
79
85
|
root = find_repo_root()
|
|
80
86
|
if not root:
|
|
81
|
-
|
|
87
|
+
# 清晰诊断, 不静默 (命令里 R= 回退 '.' 但那常是会话临时目录, 后续脚本全失败)
|
|
88
|
+
import sys as _sys
|
|
89
|
+
anchor = os.path.join(os.path.expanduser('~'), '.qoderwork', '.repo-root')
|
|
90
|
+
_sys.stderr.write('ERROR: repo_root.py 无法定位 QODER 仓库根。\n')
|
|
91
|
+
_sys.stderr.write(' cwd: %s\n' % os.getcwd())
|
|
92
|
+
_sys.stderr.write(' 锚点 %s 存在? %s\n' % (anchor, os.path.isfile(anchor)))
|
|
93
|
+
_sys.stderr.write(' 修复: 在项目根跑 "npx @hupan56/wlkj init" (写 .repo-root 锚点),\n')
|
|
94
|
+
_sys.stderr.write(' 或设环境变量 QODER_REPO=<项目根>。\n')
|
|
82
95
|
return 1
|
|
83
96
|
|
|
84
97
|
# 子路径模式: --script / --template
|