@hupan56/wlkj 3.1.14 → 3.1.16
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 +20 -2
- package/package.json +1 -1
- package/templates/qoder/agents/design-agent.md +20 -20
- package/templates/qoder/agents/insight-planning.md +1 -1
- package/templates/qoder/agents/prd-quick.md +2 -2
- package/templates/qoder/agents/prd-reference.md +4 -4
- package/templates/qoder/agents/qoder-coder.toml +3 -4
- package/templates/qoder/agents/qoder-test-gen.toml +3 -4
package/bin/cli.js
CHANGED
|
@@ -951,8 +951,26 @@ function doUpdate() {
|
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
} catch { /* */ }
|
|
954
|
-
|
|
955
|
-
|
|
954
|
+
// 清理引擎 __pycache__ (v3.x 加): 脚本重组后, 旧 .pyc 可能指向已删/已移的 .py
|
|
955
|
+
// → 某些机器 Python 加载死字节码 → 行为漂移 (机器特定, 难排查)。全删, 自动重建。
|
|
956
|
+
let pycCleaned = 0;
|
|
957
|
+
function _purgePycache(dir) {
|
|
958
|
+
try {
|
|
959
|
+
for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
960
|
+
const p = path.join(dir, e.name);
|
|
961
|
+
if (e.isDirectory()) {
|
|
962
|
+
if (e.name === "__pycache__") {
|
|
963
|
+
try { fs.rmSync(p, { recursive: true, force: true }); pycCleaned++; } catch { /* 占用 */ }
|
|
964
|
+
} else {
|
|
965
|
+
_purgePycache(p);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
} catch { /* */ }
|
|
970
|
+
}
|
|
971
|
+
_purgePycache(path.join(cwd, ".qoder", "scripts"));
|
|
972
|
+
if (cleaned > 0 || cacheCleaned > 0 || pycCleaned > 0) {
|
|
973
|
+
console.log(` [清理] 废弃文件 ${cleaned} 个 + 过期缓存 ${cacheCleaned} 个 + __pycache__ ${pycCleaned} 个`);
|
|
956
974
|
}
|
|
957
975
|
|
|
958
976
|
// === 5c. 清理 .qoder 嵌套残留 (致命 bug 源) ===
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
# Design Agent
|
|
2
|
-
|
|
3
|
-
## Required: Load Context First (Pull-Based)
|
|
4
|
-
Load task context yourself. Run: python .qoder/scripts/
|
|
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
|
|
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
|
|
@@ -9,7 +9,7 @@ Read the dispatch prompt — it MUST contain: topic, current developer name,
|
|
|
9
9
|
and either (a) a reference to a recent insight research report, or
|
|
10
10
|
(b) a user-described ideal state. If neither, STOP and report back:
|
|
11
11
|
"planning needs an ideal state — either a research report or user description".
|
|
12
|
-
For current state, run: `python .qoder/scripts/
|
|
12
|
+
For current state, run: `python .qoder/scripts/orchestration/wlkj.py context <关键词> --platform <web|app>`
|
|
13
13
|
|
|
14
14
|
## Recursion Guard
|
|
15
15
|
You are the insight-planning sub-agent. Do NOT spawn another insight-planning agent.
|
|
@@ -15,7 +15,7 @@ You are the prd-quick sub-agent. Do NOT spawn another.
|
|
|
15
15
|
|
|
16
16
|
### Step 1: 一次取全上下文(1 次调用)
|
|
17
17
|
```bash
|
|
18
|
-
python .qoder/scripts/
|
|
18
|
+
python .qoder/scripts/orchestration/wlkj.py context <关键词> --platform <web|app>
|
|
19
19
|
```
|
|
20
20
|
> context_pack 一次返回代码+页面+字段+API+样式。**不要**再单独跑 search_index。
|
|
21
21
|
> 只读返回结果里最相关的 **1-2 个文件**(用 Read 工具)。**不要读超过 3 个文件**。
|
|
@@ -32,7 +32,7 @@ python .qoder/scripts/context_pack.py <关键词> --platform <web|app>
|
|
|
32
32
|
|
|
33
33
|
### Step 3: 一句话确认
|
|
34
34
|
把 PRD 和原型路径告诉用户,问"可以吗?可以就推送给团队"。
|
|
35
|
-
用户确认 → `python .qoder/scripts/
|
|
35
|
+
用户确认 → `python .qoder/scripts/orchestration/wlkj.py sync push`
|
|
36
36
|
|
|
37
37
|
## Mini-PRD 极简格式
|
|
38
38
|
```markdown
|
|
@@ -6,7 +6,7 @@ This platform does NOT auto-inject task context. Before anything else:
|
|
|
6
6
|
user requirement, current developer name
|
|
7
7
|
2. If platform is missing from the dispatch prompt, STOP and report back:
|
|
8
8
|
"platform not specified - caller must ask user first (see /wl-prd-full Step 0)"
|
|
9
|
-
3. If task context needed: python .qoder/scripts/
|
|
9
|
+
3. If task context needed: python .qoder/scripts/orchestration/wlkj.py task current --source
|
|
10
10
|
|
|
11
11
|
## Recursion Guard
|
|
12
12
|
You are the prd-reference sub-agent.
|
|
@@ -20,9 +20,9 @@ Generate PRD + prototype by referencing existing project data.
|
|
|
20
20
|
|
|
21
21
|
## Workflow
|
|
22
22
|
1. Search the index (platform-aware):
|
|
23
|
-
python .qoder/scripts/
|
|
24
|
-
python .qoder/scripts/
|
|
25
|
-
python .qoder/scripts/
|
|
23
|
+
python .qoder/scripts/orchestration/wlkj.py search <keyword> --platform <web|app>
|
|
24
|
+
python .qoder/scripts/orchestration/wlkj.py search --style <type> --platform <web|app>
|
|
25
|
+
python .qoder/scripts/orchestration/wlkj.py search --prd <keyword>
|
|
26
26
|
(首选 context_pack.py 一次取全,search_index 仅作单项下钻兜底)
|
|
27
27
|
2. Read related historical PRDs from data/docs/prd/
|
|
28
28
|
3. Read data/docs/drafts/ for business drafts
|
|
@@ -17,9 +17,8 @@ developer_instructions = """
|
|
|
17
17
|
### Step 2: 读取上下文
|
|
18
18
|
1. Spec 文件 — 开发规格(必需)
|
|
19
19
|
2. PRD 文件 — 原始需求(推荐)
|
|
20
|
-
3.
|
|
21
|
-
4.
|
|
22
|
-
5. `.qoder/context/data-dictionary.md` — 数据字典
|
|
20
|
+
3. `data/docs/architecture/` — 架构说明(读 kg-layers.md 等)
|
|
21
|
+
4. 团队代码风格: 读目标模块周围的现有代码, 与其风格一致 (无独立 code-style.md)
|
|
23
22
|
|
|
24
23
|
### Step 3: 按 Spec 实现
|
|
25
24
|
严格按照 Spec 规格编码:
|
|
@@ -31,7 +30,7 @@ developer_instructions = """
|
|
|
31
30
|
### Step 4: 自检
|
|
32
31
|
- 所有 Spec 定义的接口都已实现
|
|
33
32
|
- 数据库字段与 Spec 一致
|
|
34
|
-
-
|
|
33
|
+
- 代码风格与周围现有代码一致
|
|
35
34
|
|
|
36
35
|
## 编码原则
|
|
37
36
|
1. 先读后写
|
|
@@ -17,11 +17,10 @@ developer_instructions = """
|
|
|
17
17
|
### Step 2: 读取上下文
|
|
18
18
|
1. 实现代码 — 被测代码(必需)
|
|
19
19
|
2. Spec 文件 — 测试要点映射(推荐)
|
|
20
|
-
3.
|
|
21
|
-
4. `.qoder/rules/code-style.md` — 代码规范
|
|
20
|
+
3. 测试规范: 参考 `data/docs/constitution/eva-metrics.md` (验收标准) + Spec 的异常场景定义
|
|
22
21
|
|
|
23
22
|
### Step 3: 生成测试
|
|
24
|
-
|
|
23
|
+
按团队规范生成:
|
|
25
24
|
- Service 层: Mock 所有依赖,Given-When-Then 模式
|
|
26
25
|
- Controller 层: MockMvc 测试
|
|
27
26
|
- 每个测试有 @DisplayName
|
|
@@ -45,4 +44,4 @@ developer_instructions = """
|
|
|
45
44
|
multi_agent = false
|
|
46
45
|
|
|
47
46
|
[features.multi_agent_v2]
|
|
48
|
-
enabled = false
|
|
47
|
+
enabled = false
|