@hupan56/wlkj 2.2.4 → 2.2.6
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 +532 -532
- package/package.json +28 -28
- package/templates/qoder/hooks/inject-workflow-state.py +117 -117
- package/templates/qoder/hooks/session-start.py +204 -204
- package/templates/qoder/scripts/common/developer.py +231 -161
- package/templates/qoder/scripts/common/paths.py +310 -310
- package/templates/qoder/scripts/common/task_utils.py +392 -392
- package/templates/qoder/scripts/common/terms.py +42 -2
- package/templates/qoder/scripts/init_developer.py +75 -75
- package/templates/qoder/scripts/install_qoderwork.py +367 -367
- package/templates/qoder/scripts/role.py +39 -39
- package/templates/qoder/scripts/search_index.py +123 -5
- package/templates/qoder/scripts/syncgate.py +333 -333
- package/templates/qoder/scripts/team_sync.py +439 -439
- package/templates/qoder/skills/design-review/SKILL.md +25 -25
- package/templates/qoder/skills/prd-generator/SKILL.md +180 -180
- package/templates/qoder/skills/prd-review/SKILL.md +36 -36
- package/templates/qoder/skills/prototype-generator/SKILL.md +141 -141
- package/templates/qoder/skills/spec-coder/SKILL.md +68 -68
- package/templates/qoder/skills/spec-generator/SKILL.md +66 -66
- package/templates/qoder/skills/test-generator/SKILL.md +71 -71
- package/templates/root/AGENTS.md +182 -182
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: test-generator
|
|
3
|
-
description: "从已实现代码和 Spec 自动生成单元测试。Auto-generate unit tests from implemented code and Spec. 用户说'写单元测试''补测试''覆盖一下''写个test'时触发。需用户确认(DANGEROUS)。"
|
|
4
|
-
trigger: "代码实现完成后;用户说'写测试''补单测''生成test''/wl-test'"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Test Generator
|
|
8
|
-
|
|
9
|
-
按团队规范,基于已实现代码和 Spec 生成单元测试。
|
|
10
|
-
|
|
11
|
-
> ⚠️ 这是 DANGEROUS 操作(会写源码)。执行前必须向用户确认。
|
|
12
|
-
|
|
13
|
-
## ⚙️ 自取上下文(Quest / QoderWork 无 hook 注入,必须自读)
|
|
14
|
-
|
|
15
|
-
- `.qoder/.developer` — 当前开发者
|
|
16
|
-
- `.qoder/.current-task` — 当前任务
|
|
17
|
-
- Spec 文件:`workspace/specs/REQ-{ID}-*.spec.md` 或 `workspace/tasks/{task-id}/spec.md`
|
|
18
|
-
- 已实现代码:用 search_index.py 定位
|
|
19
|
-
```bash
|
|
20
|
-
python .qoder/scripts/search_index.py <类名或模块关键词>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Step 1: 定位待测代码
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
ls workspace/specs/REQ-{ID}-*.md # Spec 文件(测试用例映射源)
|
|
27
|
-
ls data/code/ # 已实现代码库
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
把 Spec 匹配到对应的实现文件。
|
|
31
|
-
|
|
32
|
-
## Step 2: 读取上下文
|
|
33
|
-
|
|
34
|
-
1. **实现代码**(必需):当前需求相关的 `data/code/` 文件
|
|
35
|
-
2. **Spec 文件**(推荐):测试用例映射来源
|
|
36
|
-
3. **现有测试代码**(推荐):用 search_index.py 找同类 Test 类,照着写
|
|
37
|
-
```bash
|
|
38
|
-
python .qoder/scripts/search_index.py Test
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Step 3: 生成测试
|
|
42
|
-
|
|
43
|
-
参照现有 Test 类的写法(命名、断言库、Mock 方式),不另起炉灶:
|
|
44
|
-
|
|
45
|
-
### Service 层测试
|
|
46
|
-
- 每个公开方法组一个测试类
|
|
47
|
-
- Mock 所有外部依赖(Mapper、外部 Service、Redis 等)
|
|
48
|
-
- 覆盖:正常路径、错误路径、边界条件
|
|
49
|
-
|
|
50
|
-
### Controller 层测试
|
|
51
|
-
- MockMvc 测端点
|
|
52
|
-
- 校验参数校验
|
|
53
|
-
- 校验返回格式
|
|
54
|
-
|
|
55
|
-
### 测试方法约定
|
|
56
|
-
- Given-When-Then 模式
|
|
57
|
-
- `@DisplayName` 中文描述
|
|
58
|
-
- 断言用 AssertJ(若现有代码用 JUnit 断言则跟随)
|
|
59
|
-
- 测试数据用 Builder 模式
|
|
60
|
-
|
|
61
|
-
## Step 4: 输出
|
|
62
|
-
|
|
63
|
-
- 路径:`tests/{package-path}/{ClassName}Test.java`(跟随现有 test 目录结构)
|
|
64
|
-
- 命名:`{TestedClassName}Test.java`
|
|
65
|
-
- 每个测试方法独立(无执行顺序依赖)
|
|
66
|
-
|
|
67
|
-
## 测试原则
|
|
68
|
-
|
|
69
|
-
1. 正常路径 100%,错误路径 100%
|
|
70
|
-
2. 核心业务边界条件全覆盖
|
|
71
|
-
3. 无外部系统依赖(全 Mock)
|
|
1
|
+
---
|
|
2
|
+
name: test-generator
|
|
3
|
+
description: "从已实现代码和 Spec 自动生成单元测试。Auto-generate unit tests from implemented code and Spec. 用户说'写单元测试''补测试''覆盖一下''写个test'时触发。需用户确认(DANGEROUS)。"
|
|
4
|
+
trigger: "代码实现完成后;用户说'写测试''补单测''生成test''/wl-test'"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Test Generator
|
|
8
|
+
|
|
9
|
+
按团队规范,基于已实现代码和 Spec 生成单元测试。
|
|
10
|
+
|
|
11
|
+
> ⚠️ 这是 DANGEROUS 操作(会写源码)。执行前必须向用户确认。
|
|
12
|
+
|
|
13
|
+
## ⚙️ 自取上下文(Quest / QoderWork 无 hook 注入,必须自读)
|
|
14
|
+
|
|
15
|
+
- `.qoder/.developer` — 当前开发者
|
|
16
|
+
- `.qoder/.current-task` — 当前任务
|
|
17
|
+
- Spec 文件:`workspace/specs/REQ-{ID}-*.spec.md` 或 `workspace/tasks/{task-id}/spec.md`
|
|
18
|
+
- 已实现代码:用 search_index.py 定位
|
|
19
|
+
```bash
|
|
20
|
+
python .qoder/scripts/search_index.py <类名或模块关键词>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Step 1: 定位待测代码
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ls workspace/specs/REQ-{ID}-*.md # Spec 文件(测试用例映射源)
|
|
27
|
+
ls data/code/ # 已实现代码库
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
把 Spec 匹配到对应的实现文件。
|
|
31
|
+
|
|
32
|
+
## Step 2: 读取上下文
|
|
33
|
+
|
|
34
|
+
1. **实现代码**(必需):当前需求相关的 `data/code/` 文件
|
|
35
|
+
2. **Spec 文件**(推荐):测试用例映射来源
|
|
36
|
+
3. **现有测试代码**(推荐):用 search_index.py 找同类 Test 类,照着写
|
|
37
|
+
```bash
|
|
38
|
+
python .qoder/scripts/search_index.py Test
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Step 3: 生成测试
|
|
42
|
+
|
|
43
|
+
参照现有 Test 类的写法(命名、断言库、Mock 方式),不另起炉灶:
|
|
44
|
+
|
|
45
|
+
### Service 层测试
|
|
46
|
+
- 每个公开方法组一个测试类
|
|
47
|
+
- Mock 所有外部依赖(Mapper、外部 Service、Redis 等)
|
|
48
|
+
- 覆盖:正常路径、错误路径、边界条件
|
|
49
|
+
|
|
50
|
+
### Controller 层测试
|
|
51
|
+
- MockMvc 测端点
|
|
52
|
+
- 校验参数校验
|
|
53
|
+
- 校验返回格式
|
|
54
|
+
|
|
55
|
+
### 测试方法约定
|
|
56
|
+
- Given-When-Then 模式
|
|
57
|
+
- `@DisplayName` 中文描述
|
|
58
|
+
- 断言用 AssertJ(若现有代码用 JUnit 断言则跟随)
|
|
59
|
+
- 测试数据用 Builder 模式
|
|
60
|
+
|
|
61
|
+
## Step 4: 输出
|
|
62
|
+
|
|
63
|
+
- 路径:`tests/{package-path}/{ClassName}Test.java`(跟随现有 test 目录结构)
|
|
64
|
+
- 命名:`{TestedClassName}Test.java`
|
|
65
|
+
- 每个测试方法独立(无执行顺序依赖)
|
|
66
|
+
|
|
67
|
+
## 测试原则
|
|
68
|
+
|
|
69
|
+
1. 正常路径 100%,错误路径 100%
|
|
70
|
+
2. 核心业务边界条件全覆盖
|
|
71
|
+
3. 无外部系统依赖(全 Mock)
|
|
72
72
|
4. 测试方法之间无相互依赖
|
package/templates/root/AGENTS.md
CHANGED
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
# QODER Pipeline
|
|
2
|
-
|
|
3
|
-
## ⚠️ CRITICAL RULE #1: ALWAYS ASK PLATFORM FIRST
|
|
4
|
-
|
|
5
|
-
**When user asks for PRD or prototype, you MUST ask this question FIRST:**
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
这个需求是针对哪个平台?
|
|
9
|
-
|
|
10
|
-
1. **Web 管理端** (fywl-ui) - Ant Design Vue + VxeGrid 风格
|
|
11
|
-
2. **APP 移动端** (Carmg-H5) - Vant 风格
|
|
12
|
-
3. **两端都要**
|
|
13
|
-
|
|
14
|
-
请选择 (1/2/3):
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**DO NOT skip this question. DO NOT auto-detect. ALWAYS ASK.**
|
|
18
|
-
**Wait for user answer before doing ANYTHING else.**
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## CRITICAL RULE #2: Use /wl-search to find code
|
|
23
|
-
|
|
24
|
-
When user asks about code, business, API, feature:
|
|
25
|
-
1. **ALWAYS** use `/wl-search <keyword>` command first
|
|
26
|
-
2. Then read only the specific files returned
|
|
27
|
-
3. **NEVER** grep the entire codebase directly
|
|
28
|
-
|
|
29
|
-
Examples:
|
|
30
|
-
- "考勤代码在哪" -> /wl-search attendance
|
|
31
|
-
- "保险定时任务" -> /wl-search insurance
|
|
32
|
-
- "薪资API" -> /wl-search --api salary
|
|
33
|
-
|
|
34
|
-
## CRITICAL RULE #2.5: 自然语言 → 技能 路由(Quest / QoderWork 入口)
|
|
35
|
-
|
|
36
|
-
Quest 与 QoderWork 没有斜杠命令,AI 必须按下表把用户自然语言映射到
|
|
37
|
-
`.qoder/skills/` 下的技能(Qoder IDE 编辑器与 CLI 用 `/wl-*` 命令,同样适用):
|
|
38
|
-
|
|
39
|
-
| 用户说什么 | 触发 skill |
|
|
40
|
-
|------------|-----------|
|
|
41
|
-
| "写个需求""生成PRD""做个原型" | prd-generator + prototype-generator |
|
|
42
|
-
| "查一下""代码在哪""搜保险""考勤API" | wl-search |
|
|
43
|
-
| "建任务""排优先级""任务做完了" | wl-task |
|
|
44
|
-
| "项目怎么样""进度""健康度" | wl-status |
|
|
45
|
-
| "写日报""周报""我干了啥" | wl-report |
|
|
46
|
-
| "用户反馈""数据怎么样" | wl-insight |
|
|
47
|
-
| "生成规格""写spec" | spec-generator |
|
|
48
|
-
| "开始写代码""按规格实现" | spec-coder |
|
|
49
|
-
| "写单元测试" | test-generator |
|
|
50
|
-
| "评审PRD" | prd-review |
|
|
51
|
-
| "提交代码""commit""推上去" | wl-commit |
|
|
52
|
-
| "初始化""换开发者""环境检查" | wl-init |
|
|
53
|
-
|
|
54
|
-
找不到明确匹配 → 先问用户意图,不要乱跑。
|
|
55
|
-
注意区分:"同步/保存产出" = team_sync(push);"提交/commit 代码" = wl-commit。
|
|
56
|
-
|
|
57
|
-
## CRITICAL RULE #3: User NEVER touches git
|
|
58
|
-
|
|
59
|
-
PMs on this team do not know git. ALL git operations are invisible:
|
|
60
|
-
- After any publish/save action (/wl-prd publish, /wl-task create/finish,
|
|
61
|
-
/wl-report save), run: `python .qoder/scripts/team_sync.py push`
|
|
62
|
-
- To get teammates' latest work: `python .qoder/scripts/team_sync.py pull`
|
|
63
|
-
- If team_sync prints SYNC_CONFLICT, YOU (the AI) resolve the conflict
|
|
64
|
-
yourself (it tells you the commands). NEVER ask the user to run git.
|
|
65
|
-
- When the user says 同步/保存/提交 in natural language -> team_sync, not raw git.
|
|
66
|
-
|
|
67
|
-
## Platform Filtering
|
|
68
|
-
|
|
69
|
-
After user selects platform, use it for search:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Search by platform
|
|
73
|
-
/wl-search 保险 --platform web # Only fywl-ui (PC)
|
|
74
|
-
/wl-search 保险 --platform app # Only Carmg-H5 (Mobile)
|
|
75
|
-
/wl-search 保险 # Both platforms
|
|
76
|
-
|
|
77
|
-
# Platform shortcuts
|
|
78
|
-
web/pc/管理端 -> fywl-ui
|
|
79
|
-
app/mobile/h5/移动端 -> Carmg-H5
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## 11 Commands (All prefixed /wl-)
|
|
83
|
-
|
|
84
|
-
### Pipeline Core
|
|
85
|
-
| Command | Auto | Purpose |
|
|
86
|
-
|---------|------|---------|
|
|
87
|
-
| `/wl-init` | YES | Register/switch developer identity |
|
|
88
|
-
| `/wl-prd` | YES | Generate PRD (ASKS platform first!) |
|
|
89
|
-
| `/wl-spec` | YES | Generate technical Spec from PRD |
|
|
90
|
-
| `/wl-code` | NO | Code implementation (needs confirm) |
|
|
91
|
-
| `/wl-commit` | NO | Git commit + push + sync (needs confirm) |
|
|
92
|
-
|
|
93
|
-
### Product Management
|
|
94
|
-
| Command | Auto | Purpose |
|
|
95
|
-
|---------|------|---------|
|
|
96
|
-
| `/wl-search` | YES | Search code index (supports Chinese, platform filtering) |
|
|
97
|
-
| `/wl-task` | YES | Task management + RICE prioritization |
|
|
98
|
-
| `/wl-status` | YES | Project status + roadmap + health |
|
|
99
|
-
| `/wl-insight` | YES | Feedback analysis + metrics review |
|
|
100
|
-
|
|
101
|
-
### Reporting
|
|
102
|
-
| Command | Auto | Purpose |
|
|
103
|
-
|---------|------|---------|
|
|
104
|
-
| `/wl-report` | YES | Generate daily or weekly work report |
|
|
105
|
-
| `/wl-test` | NO | Generate unit tests (needs confirm) |
|
|
106
|
-
|
|
107
|
-
## Knowledge Index
|
|
108
|
-
|
|
109
|
-
3 projects: Carmg-H5(1378 files), fywl-ics(8973 files, 3903 APIs), fywl-ui(3270 files)
|
|
110
|
-
Search: /wl-search <keyword> returns compact results (~200 bytes)
|
|
111
|
-
Weekly sync: python .qoder/scripts/git_sync.py
|
|
112
|
-
|
|
113
|
-
### Style Index (Prototype Reference)
|
|
114
|
-
UI patterns from Vue files: Tables(718), Forms(301), Detail(129), Dashboard(90)
|
|
115
|
-
Top components: Space(583), Modal(270), Select(172), Input(134)
|
|
116
|
-
Form components: Input(2262), Select(1049), ApiSelect(725), DatePicker(265)
|
|
117
|
-
Field map: 2383 entries
|
|
118
|
-
|
|
119
|
-
Style search:
|
|
120
|
-
python .qoder/scripts/search_index.py --style table/form/modal/dashboard
|
|
121
|
-
python .qoder/scripts/search_index.py --field <field_name>
|
|
122
|
-
python .qoder/scripts/search_index.py --components
|
|
123
|
-
python .qoder/scripts/search_index.py --vben # Vben Admin CSS variables
|
|
124
|
-
|
|
125
|
-
Prototype templates:
|
|
126
|
-
.qoder/templates/prototype-web.html # Web管理端 (Vben Admin + Ant Design)
|
|
127
|
-
.qoder/templates/prototype-app.html # APP移动端 (Vant)
|
|
128
|
-
|
|
129
|
-
Prototype output: workspace/members/{dev}/drafts/prototype-{feature}.html
|
|
130
|
-
Style priority: Code > PDF > Default
|
|
131
|
-
|
|
132
|
-
## Workflow
|
|
133
|
-
|
|
134
|
-
/wl-init -> /wl-prd (ASK PLATFORM!) -> /wl-task -> /wl-spec -> /wl-code -> /wl-test -> /wl-commit -> /wl-report
|
|
135
|
-
|
|
136
|
-
## Cross-platform & Qoder Product Family Compatibility
|
|
137
|
-
|
|
138
|
-
This pipeline works on Windows + macOS, across the whole Qoder family.
|
|
139
|
-
Each product loads rules from a different carrier — keep them in sync:
|
|
140
|
-
|
|
141
|
-
| 产品/模式 | 规则载体 | 命令载体 |
|
|
142
|
-
|-----------|---------|---------|
|
|
143
|
-
| Qoder IDE 默认编辑器 | .qoder/rules/wl-pipeline.md (always_on) | .qoder/commands/wl-*.md |
|
|
144
|
-
| Qoder Quest 模式 | .qoder/rules/ + .qoder/skills/ + .qoder/agents/ | 自然语言 -> skills |
|
|
145
|
-
| Qoder CLI (qodercli) | 本文件 AGENTS.md | 自然语言 -> scripts |
|
|
146
|
-
| QoderWork 桌面 Agent | 安装 .qoder/skills/ 下的技能 | 自然语言 -> skills |
|
|
147
|
-
| Claude Code 等其他工具 | 本文件 AGENTS.md | .qoder/commands/wl-*.md |
|
|
148
|
-
|
|
149
|
-
- THE rule file: `.qoder/rules/wl-pipeline.md` — 修改流程规则时同步更新它和本文件
|
|
150
|
-
- Quest 修改 agents/skills 后需重启 Quest 窗口/新建对话才能生效(Qoder 已知限制)
|
|
151
|
-
- **Repo Wiki** (`.qoder/repowiki/`, Qoder IDE 生成): 存在则作为模块级知识源,
|
|
152
|
-
写 PRD 前优先查相关模块页;可提交 git 团队共享。索引管"定位", Wiki 管"理解"。
|
|
153
|
-
- All scripts are pure Python 3 + git, path-autodetecting (no hardcoded
|
|
154
|
-
drive letters). Invoke as `python` (Windows) or `python3` (macOS).
|
|
155
|
-
- Weekly update: Windows -> scripts/setup_weekly_cron.bat,
|
|
156
|
-
macOS/Linux -> scripts/setup_weekly_cron.sh. Only ONE machine per team
|
|
157
|
-
needs this; everyone else gets the graph via /wl-init's auto pull.
|
|
158
|
-
- Environment problems of any kind -> run:
|
|
159
|
-
`python .qoder/scripts/init_doctor.py` (add --fix to auto-repair).
|
|
160
|
-
|
|
161
|
-
## Fast Path: one call to get all context
|
|
162
|
-
|
|
163
|
-
`python .qoder/scripts/context_pack.py <业务词> --platform <web|app>` returns
|
|
164
|
-
code files + page examples + field specs + PRDs + APIs + style/icon pointers
|
|
165
|
-
in ONE call. Use it FIRST; fall back to search_index.py for drill-down.
|
|
166
|
-
|
|
167
|
-
## Icons: NEVER emoji
|
|
168
|
-
|
|
169
|
-
Prototypes use the projects' real icon systems (data/index/icon-reference.json):
|
|
170
|
-
Web = Ant Design inline SVG, APP = Vant font icons. Emoji in a prototype = FAIL.
|
|
171
|
-
|
|
172
|
-
## Quality Gate (EVA)
|
|
173
|
-
|
|
174
|
-
Before publishing any PRD: `python .qoder/scripts/eval_prd.py <prd> [prototype]`
|
|
175
|
-
must PASS (>=80%). Metrics definition: data/docs/constitution/eva-metrics.md
|
|
176
|
-
|
|
177
|
-
## Permission Model
|
|
178
|
-
|
|
179
|
-
| Level | Commands | Auto |
|
|
180
|
-
|-------|---------|------|
|
|
181
|
-
| SAFE | /wl-init, /wl-prd, /wl-search, /wl-task, /wl-spec, /wl-status, /wl-insight, /wl-report | YES |
|
|
182
|
-
| DANGEROUS | /wl-code, /wl-test, /wl-commit | NO |
|
|
1
|
+
# QODER Pipeline
|
|
2
|
+
|
|
3
|
+
## ⚠️ CRITICAL RULE #1: ALWAYS ASK PLATFORM FIRST
|
|
4
|
+
|
|
5
|
+
**When user asks for PRD or prototype, you MUST ask this question FIRST:**
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
这个需求是针对哪个平台?
|
|
9
|
+
|
|
10
|
+
1. **Web 管理端** (fywl-ui) - Ant Design Vue + VxeGrid 风格
|
|
11
|
+
2. **APP 移动端** (Carmg-H5) - Vant 风格
|
|
12
|
+
3. **两端都要**
|
|
13
|
+
|
|
14
|
+
请选择 (1/2/3):
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**DO NOT skip this question. DO NOT auto-detect. ALWAYS ASK.**
|
|
18
|
+
**Wait for user answer before doing ANYTHING else.**
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## CRITICAL RULE #2: Use /wl-search to find code
|
|
23
|
+
|
|
24
|
+
When user asks about code, business, API, feature:
|
|
25
|
+
1. **ALWAYS** use `/wl-search <keyword>` command first
|
|
26
|
+
2. Then read only the specific files returned
|
|
27
|
+
3. **NEVER** grep the entire codebase directly
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
- "考勤代码在哪" -> /wl-search attendance
|
|
31
|
+
- "保险定时任务" -> /wl-search insurance
|
|
32
|
+
- "薪资API" -> /wl-search --api salary
|
|
33
|
+
|
|
34
|
+
## CRITICAL RULE #2.5: 自然语言 → 技能 路由(Quest / QoderWork 入口)
|
|
35
|
+
|
|
36
|
+
Quest 与 QoderWork 没有斜杠命令,AI 必须按下表把用户自然语言映射到
|
|
37
|
+
`.qoder/skills/` 下的技能(Qoder IDE 编辑器与 CLI 用 `/wl-*` 命令,同样适用):
|
|
38
|
+
|
|
39
|
+
| 用户说什么 | 触发 skill |
|
|
40
|
+
|------------|-----------|
|
|
41
|
+
| "写个需求""生成PRD""做个原型" | prd-generator + prototype-generator |
|
|
42
|
+
| "查一下""代码在哪""搜保险""考勤API" | wl-search |
|
|
43
|
+
| "建任务""排优先级""任务做完了" | wl-task |
|
|
44
|
+
| "项目怎么样""进度""健康度" | wl-status |
|
|
45
|
+
| "写日报""周报""我干了啥" | wl-report |
|
|
46
|
+
| "用户反馈""数据怎么样" | wl-insight |
|
|
47
|
+
| "生成规格""写spec" | spec-generator |
|
|
48
|
+
| "开始写代码""按规格实现" | spec-coder |
|
|
49
|
+
| "写单元测试" | test-generator |
|
|
50
|
+
| "评审PRD" | prd-review |
|
|
51
|
+
| "提交代码""commit""推上去" | wl-commit |
|
|
52
|
+
| "初始化""换开发者""环境检查" | wl-init |
|
|
53
|
+
|
|
54
|
+
找不到明确匹配 → 先问用户意图,不要乱跑。
|
|
55
|
+
注意区分:"同步/保存产出" = team_sync(push);"提交/commit 代码" = wl-commit。
|
|
56
|
+
|
|
57
|
+
## CRITICAL RULE #3: User NEVER touches git
|
|
58
|
+
|
|
59
|
+
PMs on this team do not know git. ALL git operations are invisible:
|
|
60
|
+
- After any publish/save action (/wl-prd publish, /wl-task create/finish,
|
|
61
|
+
/wl-report save), run: `python .qoder/scripts/team_sync.py push`
|
|
62
|
+
- To get teammates' latest work: `python .qoder/scripts/team_sync.py pull`
|
|
63
|
+
- If team_sync prints SYNC_CONFLICT, YOU (the AI) resolve the conflict
|
|
64
|
+
yourself (it tells you the commands). NEVER ask the user to run git.
|
|
65
|
+
- When the user says 同步/保存/提交 in natural language -> team_sync, not raw git.
|
|
66
|
+
|
|
67
|
+
## Platform Filtering
|
|
68
|
+
|
|
69
|
+
After user selects platform, use it for search:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Search by platform
|
|
73
|
+
/wl-search 保险 --platform web # Only fywl-ui (PC)
|
|
74
|
+
/wl-search 保险 --platform app # Only Carmg-H5 (Mobile)
|
|
75
|
+
/wl-search 保险 # Both platforms
|
|
76
|
+
|
|
77
|
+
# Platform shortcuts
|
|
78
|
+
web/pc/管理端 -> fywl-ui
|
|
79
|
+
app/mobile/h5/移动端 -> Carmg-H5
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## 11 Commands (All prefixed /wl-)
|
|
83
|
+
|
|
84
|
+
### Pipeline Core
|
|
85
|
+
| Command | Auto | Purpose |
|
|
86
|
+
|---------|------|---------|
|
|
87
|
+
| `/wl-init` | YES | Register/switch developer identity |
|
|
88
|
+
| `/wl-prd` | YES | Generate PRD (ASKS platform first!) |
|
|
89
|
+
| `/wl-spec` | YES | Generate technical Spec from PRD |
|
|
90
|
+
| `/wl-code` | NO | Code implementation (needs confirm) |
|
|
91
|
+
| `/wl-commit` | NO | Git commit + push + sync (needs confirm) |
|
|
92
|
+
|
|
93
|
+
### Product Management
|
|
94
|
+
| Command | Auto | Purpose |
|
|
95
|
+
|---------|------|---------|
|
|
96
|
+
| `/wl-search` | YES | Search code index (supports Chinese, platform filtering) |
|
|
97
|
+
| `/wl-task` | YES | Task management + RICE prioritization |
|
|
98
|
+
| `/wl-status` | YES | Project status + roadmap + health |
|
|
99
|
+
| `/wl-insight` | YES | Feedback analysis + metrics review |
|
|
100
|
+
|
|
101
|
+
### Reporting
|
|
102
|
+
| Command | Auto | Purpose |
|
|
103
|
+
|---------|------|---------|
|
|
104
|
+
| `/wl-report` | YES | Generate daily or weekly work report |
|
|
105
|
+
| `/wl-test` | NO | Generate unit tests (needs confirm) |
|
|
106
|
+
|
|
107
|
+
## Knowledge Index
|
|
108
|
+
|
|
109
|
+
3 projects: Carmg-H5(1378 files), fywl-ics(8973 files, 3903 APIs), fywl-ui(3270 files)
|
|
110
|
+
Search: /wl-search <keyword> returns compact results (~200 bytes)
|
|
111
|
+
Weekly sync: python .qoder/scripts/git_sync.py
|
|
112
|
+
|
|
113
|
+
### Style Index (Prototype Reference)
|
|
114
|
+
UI patterns from Vue files: Tables(718), Forms(301), Detail(129), Dashboard(90)
|
|
115
|
+
Top components: Space(583), Modal(270), Select(172), Input(134)
|
|
116
|
+
Form components: Input(2262), Select(1049), ApiSelect(725), DatePicker(265)
|
|
117
|
+
Field map: 2383 entries
|
|
118
|
+
|
|
119
|
+
Style search:
|
|
120
|
+
python .qoder/scripts/search_index.py --style table/form/modal/dashboard
|
|
121
|
+
python .qoder/scripts/search_index.py --field <field_name>
|
|
122
|
+
python .qoder/scripts/search_index.py --components
|
|
123
|
+
python .qoder/scripts/search_index.py --vben # Vben Admin CSS variables
|
|
124
|
+
|
|
125
|
+
Prototype templates:
|
|
126
|
+
.qoder/templates/prototype-web.html # Web管理端 (Vben Admin + Ant Design)
|
|
127
|
+
.qoder/templates/prototype-app.html # APP移动端 (Vant)
|
|
128
|
+
|
|
129
|
+
Prototype output: workspace/members/{dev}/drafts/prototype-{feature}.html
|
|
130
|
+
Style priority: Code > PDF > Default
|
|
131
|
+
|
|
132
|
+
## Workflow
|
|
133
|
+
|
|
134
|
+
/wl-init -> /wl-prd (ASK PLATFORM!) -> /wl-task -> /wl-spec -> /wl-code -> /wl-test -> /wl-commit -> /wl-report
|
|
135
|
+
|
|
136
|
+
## Cross-platform & Qoder Product Family Compatibility
|
|
137
|
+
|
|
138
|
+
This pipeline works on Windows + macOS, across the whole Qoder family.
|
|
139
|
+
Each product loads rules from a different carrier — keep them in sync:
|
|
140
|
+
|
|
141
|
+
| 产品/模式 | 规则载体 | 命令载体 |
|
|
142
|
+
|-----------|---------|---------|
|
|
143
|
+
| Qoder IDE 默认编辑器 | .qoder/rules/wl-pipeline.md (always_on) | .qoder/commands/wl-*.md |
|
|
144
|
+
| Qoder Quest 模式 | .qoder/rules/ + .qoder/skills/ + .qoder/agents/ | 自然语言 -> skills |
|
|
145
|
+
| Qoder CLI (qodercli) | 本文件 AGENTS.md | 自然语言 -> scripts |
|
|
146
|
+
| QoderWork 桌面 Agent | 安装 .qoder/skills/ 下的技能 | 自然语言 -> skills |
|
|
147
|
+
| Claude Code 等其他工具 | 本文件 AGENTS.md | .qoder/commands/wl-*.md |
|
|
148
|
+
|
|
149
|
+
- THE rule file: `.qoder/rules/wl-pipeline.md` — 修改流程规则时同步更新它和本文件
|
|
150
|
+
- Quest 修改 agents/skills 后需重启 Quest 窗口/新建对话才能生效(Qoder 已知限制)
|
|
151
|
+
- **Repo Wiki** (`.qoder/repowiki/`, Qoder IDE 生成): 存在则作为模块级知识源,
|
|
152
|
+
写 PRD 前优先查相关模块页;可提交 git 团队共享。索引管"定位", Wiki 管"理解"。
|
|
153
|
+
- All scripts are pure Python 3 + git, path-autodetecting (no hardcoded
|
|
154
|
+
drive letters). Invoke as `python` (Windows) or `python3` (macOS).
|
|
155
|
+
- Weekly update: Windows -> scripts/setup_weekly_cron.bat,
|
|
156
|
+
macOS/Linux -> scripts/setup_weekly_cron.sh. Only ONE machine per team
|
|
157
|
+
needs this; everyone else gets the graph via /wl-init's auto pull.
|
|
158
|
+
- Environment problems of any kind -> run:
|
|
159
|
+
`python .qoder/scripts/init_doctor.py` (add --fix to auto-repair).
|
|
160
|
+
|
|
161
|
+
## Fast Path: one call to get all context
|
|
162
|
+
|
|
163
|
+
`python .qoder/scripts/context_pack.py <业务词> --platform <web|app>` returns
|
|
164
|
+
code files + page examples + field specs + PRDs + APIs + style/icon pointers
|
|
165
|
+
in ONE call. Use it FIRST; fall back to search_index.py for drill-down.
|
|
166
|
+
|
|
167
|
+
## Icons: NEVER emoji
|
|
168
|
+
|
|
169
|
+
Prototypes use the projects' real icon systems (data/index/icon-reference.json):
|
|
170
|
+
Web = Ant Design inline SVG, APP = Vant font icons. Emoji in a prototype = FAIL.
|
|
171
|
+
|
|
172
|
+
## Quality Gate (EVA)
|
|
173
|
+
|
|
174
|
+
Before publishing any PRD: `python .qoder/scripts/eval_prd.py <prd> [prototype]`
|
|
175
|
+
must PASS (>=80%). Metrics definition: data/docs/constitution/eva-metrics.md
|
|
176
|
+
|
|
177
|
+
## Permission Model
|
|
178
|
+
|
|
179
|
+
| Level | Commands | Auto |
|
|
180
|
+
|-------|---------|------|
|
|
181
|
+
| SAFE | /wl-init, /wl-prd, /wl-search, /wl-task, /wl-spec, /wl-status, /wl-insight, /wl-report | YES |
|
|
182
|
+
| DANGEROUS | /wl-code, /wl-test, /wl-commit | NO |
|