@hupan56/wlkj 2.0.0

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 (87) hide show
  1. package/bin/cli.js +213 -0
  2. package/package.json +11 -0
  3. package/templates/cli.js +198 -0
  4. package/templates/qoder/commands/wl-code.md +43 -0
  5. package/templates/qoder/commands/wl-commit.md +30 -0
  6. package/templates/qoder/commands/wl-init.md +80 -0
  7. package/templates/qoder/commands/wl-insight.md +51 -0
  8. package/templates/qoder/commands/wl-prd.md +199 -0
  9. package/templates/qoder/commands/wl-report.md +166 -0
  10. package/templates/qoder/commands/wl-search.md +52 -0
  11. package/templates/qoder/commands/wl-spec.md +18 -0
  12. package/templates/qoder/commands/wl-status.md +51 -0
  13. package/templates/qoder/commands/wl-task.md +71 -0
  14. package/templates/qoder/commands/wl-test.md +42 -0
  15. package/templates/qoder/config.toml +5 -0
  16. package/templates/qoder/config.yaml +141 -0
  17. package/templates/qoder/hooks/inject-workflow-state.py +117 -0
  18. package/templates/qoder/hooks/session-start.py +204 -0
  19. package/templates/qoder/rules/wl-pipeline.md +105 -0
  20. package/templates/qoder/scripts/add_session.py +245 -0
  21. package/templates/qoder/scripts/benchmark.py +209 -0
  22. package/templates/qoder/scripts/build_style_index.py +268 -0
  23. package/templates/qoder/scripts/code_index.py +41 -0
  24. package/templates/qoder/scripts/collect_prds.py +31 -0
  25. package/templates/qoder/scripts/common/__init__.py +0 -0
  26. package/templates/qoder/scripts/common/active_task.py +230 -0
  27. package/templates/qoder/scripts/common/atomicio.py +172 -0
  28. package/templates/qoder/scripts/common/developer.py +161 -0
  29. package/templates/qoder/scripts/common/eval_api.py +144 -0
  30. package/templates/qoder/scripts/common/feishu.py +278 -0
  31. package/templates/qoder/scripts/common/filelock.py +211 -0
  32. package/templates/qoder/scripts/common/identity.py +285 -0
  33. package/templates/qoder/scripts/common/mentions.py +134 -0
  34. package/templates/qoder/scripts/common/paths.py +311 -0
  35. package/templates/qoder/scripts/common/reqid.py +218 -0
  36. package/templates/qoder/scripts/common/search_engine.py +205 -0
  37. package/templates/qoder/scripts/common/task_utils.py +342 -0
  38. package/templates/qoder/scripts/common/terms.py +234 -0
  39. package/templates/qoder/scripts/common/utf8.py +38 -0
  40. package/templates/qoder/scripts/context_pack.py +196 -0
  41. package/templates/qoder/scripts/eval_prd.py +225 -0
  42. package/templates/qoder/scripts/export.py +487 -0
  43. package/templates/qoder/scripts/git_sync.py +1087 -0
  44. package/templates/qoder/scripts/handoff.py +22 -0
  45. package/templates/qoder/scripts/init_developer.py +76 -0
  46. package/templates/qoder/scripts/init_doctor.py +527 -0
  47. package/templates/qoder/scripts/install_qoderwork.py +339 -0
  48. package/templates/qoder/scripts/learn.py +67 -0
  49. package/templates/qoder/scripts/notify.py +5 -0
  50. package/templates/qoder/scripts/parse_prds.py +33 -0
  51. package/templates/qoder/scripts/report.py +281 -0
  52. package/templates/qoder/scripts/role.py +39 -0
  53. package/templates/qoder/scripts/run_weekly_update.bat +17 -0
  54. package/templates/qoder/scripts/run_weekly_update.sh +20 -0
  55. package/templates/qoder/scripts/search_index.py +352 -0
  56. package/templates/qoder/scripts/setup.py +453 -0
  57. package/templates/qoder/scripts/setup_weekly_cron.bat +22 -0
  58. package/templates/qoder/scripts/setup_weekly_cron.sh +19 -0
  59. package/templates/qoder/scripts/status.py +389 -0
  60. package/templates/qoder/scripts/syncgate.py +330 -0
  61. package/templates/qoder/scripts/task.py +954 -0
  62. package/templates/qoder/scripts/team.py +29 -0
  63. package/templates/qoder/scripts/team_sync.py +419 -0
  64. package/templates/qoder/scripts/workspace_init.py +102 -0
  65. package/templates/qoder/settings.json +53 -0
  66. package/templates/qoder/skills/design-review/SKILL.md +25 -0
  67. package/templates/qoder/skills/prd-generator/SKILL.md +180 -0
  68. package/templates/qoder/skills/prd-review/SKILL.md +36 -0
  69. package/templates/qoder/skills/prototype-generator/SKILL.md +141 -0
  70. package/templates/qoder/skills/spec-coder/SKILL.md +69 -0
  71. package/templates/qoder/skills/spec-generator/SKILL.md +67 -0
  72. package/templates/qoder/skills/test-generator/SKILL.md +72 -0
  73. package/templates/qoder/skills/wl-commit/SKILL.md +76 -0
  74. package/templates/qoder/skills/wl-init/SKILL.md +67 -0
  75. package/templates/qoder/skills/wl-insight/SKILL.md +81 -0
  76. package/templates/qoder/skills/wl-report/SKILL.md +87 -0
  77. package/templates/qoder/skills/wl-search/SKILL.md +75 -0
  78. package/templates/qoder/skills/wl-status/SKILL.md +61 -0
  79. package/templates/qoder/skills/wl-task/SKILL.md +58 -0
  80. package/templates/qoder/templates/prd-full-template.md +103 -0
  81. package/templates/qoder/templates/prd-quick-template.md +69 -0
  82. package/templates/qoder/templates/prototype-app.html +344 -0
  83. package/templates/qoder/templates/prototype-web.html +310 -0
  84. package/templates/root/AGENTS.md +182 -0
  85. package/templates/root/README-pipeline.md +56 -0
  86. package/templates/root/ROLES.md +85 -0
  87. package/templates/root//346/226/260/346/211/213/346/214/207/345/215/227.md +186 -0
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: wl-prd
3
+ description: "Generate PRD with prototype matching project style"
4
+ argument-hint: "[mode] [description] modes: reference/brainstorm/plan/quick"
5
+ auto-approve: true
6
+ allowed-tools: [Read, Glob, Grep, Bash, Write, Edit, Agent]
7
+ ---
8
+
9
+ # /wl-prd - Generate PRD + Prototype
10
+
11
+ User input: $ARGUMENTS
12
+
13
+ ## ⚠️ STEP 0: MANDATORY PLATFORM SELECTION (MUST DO FIRST!)
14
+
15
+ **Before ANY search, ANY file read, ANY analysis — ask this question.**
16
+ **NEVER auto-detect. NEVER assume. NEVER skip. ALWAYS ASK.**
17
+
18
+ ```
19
+ 这个需求是针对哪个平台?
20
+
21
+ 1. **Web 管理端** (fywl-ui) - Ant Design Vue + VxeGrid 风格
22
+ 2. **APP 移动端** (Carmg-H5) - Vant 风格
23
+ 3. **两端都要**
24
+
25
+ 请选择 (1/2/3):
26
+ ```
27
+
28
+ WAIT for the answer. Platform determines everything downstream:
29
+
30
+ | Answer | Platform | Project | Search Flag | Prototype Template |
31
+ |--------|----------|---------|-------------|--------------------|
32
+ | 1 / Web / PC / 管理端 | Web | fywl-ui | `--platform web` | .qoder/templates/prototype-web.html |
33
+ | 2 / APP / H5 / 移动端 | APP | Carmg-H5 | `--platform app` | .qoder/templates/prototype-app.html |
34
+ | 3 / 都要 / 两端 | Both | Both | run both | both templates, 2 prototypes |
35
+
36
+ ## Mode Detection
37
+
38
+ | Keyword in input | Mode | Sub-agent (.qoder/agents/) |
39
+ |------------------|------|---------------------------|
40
+ | (none, DEFAULT) | Reference | prd-reference.md |
41
+ | "头脑风暴" / "brainstorm" | Brainstorm | prd-research.md (N parallel) |
42
+ | "规划" / "plan" | Planning | prd-planning.md |
43
+ | "快速" / "quick" | Quick | prd-quick.md |
44
+
45
+ The agent files define the detailed workflow for each mode. When
46
+ dispatching a sub-agent, ALWAYS include in the dispatch prompt:
47
+ the chosen platform, the user requirement, and the current developer name.
48
+ For simple requirements you may run the mode workflow inline instead of
49
+ dispatching — the steps are the same.
50
+
51
+ ## Storage
52
+
53
+ Draft -> workspace/members/{developer}/drafts/REQ-{ID}-{desc}.md
54
+ Confirmed -> workspace/specs/prd/REQ-{ID}-{desc}.md
55
+ Prototype (single platform) -> workspace/members/{developer}/drafts/prototype-{feature}.html
56
+ Prototype (Both) -> prototype-{feature}-web.html AND prototype-{feature}-app.html
57
+
58
+ REQ-ID rule: **必须**调用原子分配器获取新 ID, 禁止手动扫描最大值 (多人并发会撞号):
59
+ ```bash
60
+ python -c "import sys; sys.path.insert(0,'.qoder/scripts'); from common.reqid import allocate_req_id; n=allocate_req_id(); print('REQ-%d-%03d' % (__import__('datetime').date.today().year, n))"
61
+ ```
62
+ 分配器在文件锁内读 data/index/req-counter.json + 递增 + 写回, 保证并发安全。
63
+ 首次使用若计数器不存在, 会自动 migrate_from_existing() 扫现有 PRD 初始化。
64
+ Never reuse an existing number. push 时 team_sync 会校验 REQ-ID 唯一性。
65
+
66
+ ---
67
+
68
+ ## Reference Mode (DEFAULT)
69
+
70
+ ### Step 1: Get ALL Context in ONE Call (fast path)
71
+ ```bash
72
+ python .qoder/scripts/context_pack.py <业务关键词> --platform <web|app> [--type table|form|dashboard]
73
+ ```
74
+ One command returns: related code files + same-type page examples +
75
+ real field specs + related PRDs + APIs + style/icon/template pointers.
76
+ Then read the top 2-3 most similar Vue files it lists.
77
+ (Fallback: individual search_index.py calls if you need to drill deeper.)
78
+
79
+ ### Step 2: Read History PRD
80
+ Read related PRDs found by `--prd` from data/docs/prd/.
81
+
82
+ ### Step 3: Read Business Drafts
83
+ Read data/docs/drafts/ for business context.
84
+
85
+ ### Step 4: Style Tokens
86
+ - Web: read data/index/vben-style-reference.json (pre-distilled design tokens)
87
+ - APP: Vant variables (see Prototype Rules below)
88
+ - Only open data/style/ PDFs if a needed token is missing from the JSON.
89
+ - If PDF conflicts with real code, CODE WINS.
90
+
91
+ ### Step 5: Confirm Findings (BATCHED)
92
+ Present ALL findings in ONE numbered list (existing behavior, related pages,
93
+ fields, business rules, assumptions). Ask the user to confirm or correct
94
+ in a single round. Only ask follow-up questions for genuinely ambiguous points.
95
+ Do NOT ask one question per finding.
96
+
97
+ ### Step 6: Generate PRD + Prototype
98
+
99
+ **PRD**: Auto-detect product type, use template, run 10-point quality check
100
+ (see prd-generator skill).
101
+
102
+ **Prototype** (KEY FEATURE):
103
+ 1. Determine prototype type (table/form/detail/modal)
104
+ 2. Start from the platform template (.qoder/templates/prototype-web.html or prototype-app.html)
105
+ 3. Fill placeholders with real fields/columns extracted from existing code
106
+ 4. Changed/new points highlighted (highlight-new class)
107
+ 5. Clickable, fillable, hover effects; single self-contained file
108
+ 6. Save per Storage rules above (Both -> 2 files with -web/-app suffix)
109
+
110
+ ### Step 7: EVA Gate + Confirm Publish + Auto Sync
111
+ Before asking to publish, run the quality gate:
112
+ ```bash
113
+ python .qoder/scripts/eval_prd.py <draft-prd.md> <prototype.html>
114
+ ```
115
+ If it FAILs (<80%), fix the reported issues (missing sections / invented
116
+ fields / non-canonical colors) and re-run until PASS. Then ask user to
117
+ confirm publishing to workspace/specs/prd/.
118
+ After publishing (and also after saving drafts/prototypes), run:
119
+ ```bash
120
+ python .qoder/scripts/team_sync.py push
121
+ ```
122
+ This silently commits & pushes the PM's outputs to the team repo.
123
+ The user NEVER needs to know git. If the script prints SYNC_CONFLICT,
124
+ YOU (the AI) resolve the git conflict following its instructions —
125
+ do not ask the user to run git commands.
126
+
127
+ ---
128
+
129
+ ## Brainstorm Mode
130
+
131
+ 1. SCAMPER 7 dimensions + 5-Why root cause analysis (inline)
132
+ 2. Dispatch N sub-agents (default 2-4, scale with topic size) using
133
+ .qoder/agents/prd-research.md — each gets a distinct perspective
134
+ (competitor / user / tech / risk), web research only
135
+ 3. Each agent writes workspace/members/{developer}/drafts/brainstorm-agent{N}-{perspective}.md
136
+ 4. MERGE all agent reports into one summary, present to user,
137
+ then DELETE the per-agent brainstorm-agent*.md files
138
+ 5. Generate PRD + prototype matching target platform style (Step 6 above)
139
+
140
+ ---
141
+
142
+ ## Planning Mode
143
+
144
+ Follow .qoder/agents/prd-planning.md:
145
+ 1. Current state analysis (read code, platform-aware search)
146
+ 2. Ideal state research (web search)
147
+ 3. Gap analysis table
148
+ 4. Current plan (MVP) + Future plan
149
+ 5. ONE confirmation round on the full report (adjust at most twice, don't loop forever)
150
+ 6. Output plan-{topic}.md AND (if user wants to proceed) PRD + prototype via Step 6
151
+
152
+ ---
153
+
154
+ ## Quick Mode
155
+
156
+ Follow .qoder/agents/prd-quick.md:
157
+ 1. Quick locate code (platform-aware search)
158
+ 2. Generate Mini-PRD + quick prototype (only change the diff)
159
+ 3. One confirmation
160
+
161
+ ---
162
+
163
+ ## Data Reading Matrix
164
+
165
+ | Mode | Read Code | Read PRD | Web Search | Read Style | Generate Prototype |
166
+ |------|-----------|----------|------------|------------|-------------------|
167
+ | Reference | YES | YES | YES | YES | YES match |
168
+ | Brainstorm | STYLE ONLY* | NO | YES | YES | YES new |
169
+ | Planning | YES | YES | YES | YES | YES diff |
170
+ | Quick | YES | NO | NO | YES | YES micro |
171
+
172
+ *Brainstorm: business research happens on the web, but the prototype style
173
+ MUST come from real code. Before generating any new-feature prototype:
174
+ run `--style <type> --platform <p>`, read 1-2 closest real pages, and for
175
+ dashboard/看板/大屏 requirements read data/index/chart-style-reference.json
176
+ (two in-system idioms: 大屏深蓝风 = dashboard/monitor, 浅色卡片风 =
177
+ dashboard/workbench). Never invent a generic admin look.
178
+
179
+ ---
180
+
181
+ ## Prototype Rules
182
+
183
+ 1. Style priority: real .vue code > vben-style-reference.json / Vant tokens > PDF spec
184
+ 2. Only change the diff, everything else identical to existing page
185
+ 3. Interactive: buttons, forms, tables must work
186
+ 4. Single file: one HTML with all CSS and JS
187
+ 5. Templates already contain the correct design tokens — do not invent colors
188
+
189
+ ### Web (fywl-ui) tokens — from data/index/vben-style-reference.json
190
+ - Primary: `hsl(212 100% 45%)` via `--primary` CSS variable
191
+ - Destructive: `hsl(359.33 100% 65.1%)`, Success: `hsl(144 57% 58%)`
192
+ - Background: `hsl(216 20.11% 95.47%)` deep / #ffffff card
193
+ - Font: PingFang SC / Microsoft YaHei, 14px
194
+ - Table: VxeGrid style, fixed header, stripe
195
+ - Form: labelWidth 80-120px, grid 2-4 columns
196
+
197
+ ### APP (Carmg-H5) tokens — Vant 3
198
+ - `--van-primary-color: #1989fa`, success #07c160, warning #ff976a, danger #ee0a24
199
+ - max-width: 375px, bottom tab bar, mobile layout
@@ -0,0 +1,166 @@
1
+ ---
2
+ name: wl-report
3
+ description: "Generate daily or weekly work report. Auto-isolates by current developer."
4
+ argument-hint: "[daily/weekly] or empty for auto-detect"
5
+ auto-approve: true
6
+ allowed-tools: [Read, Bash]
7
+ ---
8
+
9
+ # /wl-report - Work Report (Isolated by Developer)
10
+
11
+ User input: $ARGUMENTS
12
+
13
+ ## CRITICAL: Data Isolation
14
+
15
+ This report ONLY shows data for the CURRENT developer.
16
+ Read `.qoder/.developer` to get the current developer name.
17
+ ALL data sources are filtered by this name.
18
+
19
+ If no developer is set, refuse and say "Run /wl-init first".
20
+
21
+ ## Mode Detection
22
+
23
+ - "daily" or "日报" -> Daily report
24
+ - "weekly" or "周报" -> Weekly report
25
+ - No keyword + today is Friday -> Weekly report
26
+ - No keyword + other days -> Daily report
27
+
28
+ ## Data Sources (All Filtered by Current Developer)
29
+
30
+ ### 1. Who am I?
31
+ ```
32
+ Read .qoder/.developer -> get developer name (e.g., "小王")
33
+ This name is used to filter ALL data below.
34
+ ```
35
+
36
+ ### 2. My Tasks (workspace/tasks/)
37
+ ```bash
38
+ # Find tasks where creator OR assignee = current developer
39
+ python .qoder/scripts/task.py list --mine
40
+ ```
41
+ Only show tasks where task.json has:
42
+ - `creator` == current developer, OR
43
+ - `assignee` == current developer
44
+
45
+ ### 3. My Session History
46
+ ```
47
+ Read: workspace/members/{current_developer}/journal/
48
+ Only files in THIS developer's journal directory.
49
+ ```
50
+
51
+ ### 4. My Git Commits
52
+ ```bash
53
+ # For each project in data/code/:
54
+ cd data/code/{project}
55
+ git log --author="{current_developer}" --since="{date}" --oneline
56
+ ```
57
+ Filter by git author matching current developer name.
58
+
59
+ ### 5. My PRDs
60
+ ```
61
+ Read: workspace/members/{current_developer}/drafts/ -> drafts by this developer
62
+ Read: workspace/specs/prd/*.md -> check if PRD frontmatter has author == current developer
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Daily Report Flow
68
+
69
+ 1. Read `.qoder/.developer` -> get developer name and role
70
+ 2. Calculate today's date range
71
+ 3. Filter tasks by creator/assignee == developer
72
+ 4. Filter git log by --author == developer
73
+ 5. Read developer's journal entries from today
74
+ 6. Check developer's drafts for new PRDs
75
+ 7. Generate report with ONLY this developer's data
76
+
77
+ Output:
78
+ ```
79
+ # 日报 - {developer}({role}) - {date}
80
+
81
+ ## 今日完成
82
+ - [Task] 完成了 XXX
83
+ - [PRD] 撰写了 XXX
84
+ - [Code] 提交了 XXX
85
+
86
+ ## 进行中
87
+ - [Task] XXX (进度 XX%)
88
+
89
+ ## 明日计划
90
+ - 基于当前任务状态自动建议
91
+
92
+ ## 备注
93
+ - {any issues or blockers}
94
+ ```
95
+
96
+ Save to: workspace/members/{developer}/journal/daily-{date}.md
97
+ Then auto-sync (user never touches git): `python .qoder/scripts/team_sync.py push`
98
+
99
+ ---
100
+
101
+ ## Weekly Report Flow
102
+
103
+ 1. Read `.qoder/.developer` -> get developer
104
+ 2. Calculate this week's range (Monday to today)
105
+ 3. Aggregate:
106
+ - Tasks completed this week (creator/assignee == developer)
107
+ - Git commits this week (--author == developer)
108
+ - PRDs created this week
109
+ - Session count from journal
110
+ 4. Calculate stats:
111
+ - Tasks completed / total tasks
112
+ - Lines of code (from git diff --stat)
113
+ - PRDs written
114
+ 5. Generate weekly summary
115
+
116
+ Output:
117
+ ```
118
+ # 周报 - {developer}({role}) - {week_range}
119
+
120
+ ## 本周概览
121
+ | 指标 | 数量 |
122
+ |------|------|
123
+ | 完成任务 | N |
124
+ | 进行中任务 | N |
125
+ | Git提交 | N次 |
126
+ | PRD产出 | N份 |
127
+
128
+ ## 本周完成 (按天分组)
129
+ ### 周一
130
+ - ...
131
+
132
+ ### 周二
133
+ - ...
134
+
135
+ ## 未完成/延期
136
+ - {overdue items, only this developer's}
137
+
138
+ ## 下周计划
139
+ - {based on pending tasks assigned to this developer}
140
+
141
+ ## 问题与建议
142
+ - {any patterns or issues}
143
+ ```
144
+
145
+ Save to: workspace/members/{developer}/journal/weekly-{week}.md
146
+ Then auto-sync (user never touches git): `python .qoder/scripts/team_sync.py push`
147
+
148
+ ---
149
+
150
+ ## Why This Is Isolated
151
+
152
+ | Data Source | Filter Method |
153
+ |-------------|--------------|
154
+ | Tasks | task.json `creator` or `assignee` == developer |
155
+ | Journal | Only read from `workspace/members/{developer}/journal/` |
156
+ | Git | `git log --author="{developer}"` |
157
+ | PRD Drafts | Only read from `workspace/members/{developer}/drafts/` |
158
+ | Confirmed PRDs | Check frontmatter `author` field |
159
+
160
+ Each developer has their OWN:
161
+ - drafts/ folder
162
+ - inbox/ folder
163
+ - journal/ folder
164
+ - task assignments
165
+
166
+ No data from other developers is included.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: wl-search
3
+ description: "Search code index by keyword or API. Auto-approve. Returns compact results."
4
+ argument-hint: "[keyword] or --api [path] or --list or --modules"
5
+ auto-approve: true
6
+ allowed-tools: [Read, Bash]
7
+ ---
8
+
9
+ # /wl-search - Search Code Index
10
+
11
+ User input: $ARGUMENTS
12
+
13
+ ## THIS IS THE ONLY WAY TO SEARCH CODE
14
+
15
+ When user asks about ANY code/business/API, use this command.
16
+ It calls search_index.py which returns compact results (~200 bytes).
17
+ DO NOT grep the entire codebase.
18
+
19
+ ## Execution
20
+
21
+ Run exactly this command:
22
+ ```
23
+ python .qoder/scripts/search_index.py $ARGUMENTS
24
+ ```
25
+
26
+ If no arguments provided, run:
27
+ ```
28
+ python .qoder/scripts/search_index.py --list
29
+ ```
30
+
31
+ ## How to Use Results
32
+
33
+ The script returns:
34
+ - Matched files grouped by project
35
+ - Shortened paths (project/module/.../file.java)
36
+ - Max 5 files per keyword
37
+
38
+ After getting results:
39
+ 1. Pick the most relevant files (2-3 max)
40
+ 2. Read ONLY those files directly
41
+ 3. Answer the user's question
42
+
43
+ ## Examples
44
+
45
+ - `/wl-search 考勤` -> searches attendance related files
46
+ - `/wl-search insurance --platform web` -> insurance files in fywl-ui only
47
+ - `/wl-search --prd 保险` -> searches collected PRDs
48
+ - `/wl-search --style table --platform web` -> table-page examples in fywl-ui
49
+ - `/wl-search --field nickName` -> where a field is used (label + files)
50
+ - `/wl-search --api salary` -> searches salary API endpoints
51
+ - `/wl-search --modules` -> shows project overview
52
+ - `/wl-search --list` -> shows top 50 keywords
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: wl-spec
3
+ description: "Generate or review Spec from PRD + Design"
4
+ argument-hint: "[review]"
5
+ auto-approve: true
6
+ allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
7
+ ---
8
+
9
+ # /wl-spec - Generate Spec
10
+
11
+ User input:
12
+
13
+ ## Auto Generate Spec
14
+ 1. Read current task PRD and design artifacts
15
+ 2. Load .qoder/agents/spec-generator.md
16
+ 3. Generate spec.md based on PRD + Design
17
+ 4. Save to workspace/specs/ or workspace/tasks/{id}/spec.md
18
+ 5. Notify dev to review
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: wl-status
3
+ description: "Project status with roadmap, milestones, dependency tracking, and health score"
4
+ argument-hint: "[scope: current/roadmap/health]"
5
+ auto-approve: true
6
+ allowed-tools: [Read, Glob, Grep, Bash]
7
+ ---
8
+
9
+ # /wl-status - Project Status + Roadmap
10
+
11
+ User input: $ARGUMENTS (default: show current status)
12
+
13
+ ## Scopes
14
+ - (no arg or "current") -> Current sprint status
15
+ - "roadmap" -> Now/Next/Later roadmap view
16
+ - "health" -> Health score assessment
17
+
18
+ ## Current Status (DEFAULT)
19
+ Show:
20
+ 1. Active developer (from .qoder/.developer)
21
+ 2. Current task (if any) + state
22
+ 3. Sprint overview:
23
+ | Metric | Value |
24
+ | Total tasks | N |
25
+ | In progress | N |
26
+ | Completed | N |
27
+ | Blocked | N |
28
+ 4. Recent activity (last 5 actions from learning/feedback.jsonl)
29
+
30
+ ## Roadmap View
31
+ 1. Scan workspace/tasks/ for all tasks
32
+ 2. Categorize:
33
+ - **Now**: in_progress tasks
34
+ - **Next**: planning tasks (ranked by RICE)
35
+ - **Later**: ideas with no task yet
36
+ 3. Show milestones (if configured)
37
+ 4. Show dependency graph
38
+ 5. Highlight blocked items
39
+
40
+ ## Health Score
41
+ Calculate from:
42
+ | Dimension | Weight | Source |
43
+ | EVA quality trend | 25% | tail .qoder/learning/eval-history.jsonl (avg score_pct, target >=80) |
44
+ | Index freshness | 20% | data/index/.index-meta.json last_sync (<=7 days) + verify checks |
45
+ | On-time delivery | 20% | task completion dates |
46
+ | Sync health | 15% | python .qoder/scripts/team_sync.py status (ahead/behind/dirty) |
47
+ | Pipeline flow | 10% | PRD->Spec->Code conversion |
48
+ | Learning growth | 10% | learning/patterns/ entries |
49
+
50
+ Score: >=4 healthy / 3-4 at risk / <3 needs attention
51
+ Also surface: 索引新鲜度天数、最近 3 次 EVA 分数、未同步产出数。
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: wl-task
3
+ description: "Manage tasks with built-in RICE prioritization. Actions: create/list/start/finish/archive/rank"
4
+ argument-hint: "[action] [task name or ID]"
5
+ auto-approve: true
6
+ allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
7
+ ---
8
+
9
+ # /wl-task - Task Management with Prioritization
10
+
11
+ User input: $ARGUMENTS
12
+
13
+ ## Actions
14
+ - create [name] - Create new task (`python .qoder/scripts/task.py create "<title>"`)
15
+ - list - List all tasks (`task.py list [--mine] [--status s]`)
16
+ - show [ID] - Show task details (`task.py show <name>`)
17
+ - start [ID] - Start task (`task.py start <name>`, planning -> in_progress)
18
+ - finish - Finish current task (`task.py finish`, -> completed)
19
+ - archive [ID] - Archive completed task (`task.py archive <name>`)
20
+ - rank - Re-prioritize all tasks using RICE (AI-driven, see below)
21
+
22
+ ## Built-in Prioritization (no /prioritize needed)
23
+ When creating multiple tasks or running "rank":
24
+ 1. Run `task.py list` to get all pending tasks
25
+ 2. Score each task: R(Reach) x I(Impact) x C(Confidence) / E(Effort)
26
+ 3. Auto-sort by RICE score and show ranked list with scores
27
+ 4. Ask: adjust any scores?
28
+ 5. Write the confirmed score into each task.json as `"rice": <score>` (Edit tool)
29
+
30
+ ## Storage
31
+ Tasks stored in: workspace/tasks/{MM-DD-slug}/
32
+ Each task: task.json + prd.md + implement.jsonl + check.jsonl
33
+ Archived tasks move to: .qoder/archive/{YYYY-MM}/{MM-DD-slug}/
34
+
35
+ ---
36
+
37
+ ## Flow
38
+
39
+ ### create
40
+ 1. Run `python .qoder/scripts/task.py create "<title>" [--assignee dev] [--priority P0-P3]`
41
+ 2. Task directory is created with task.json (status=planning) and prd.md template
42
+ 3. If user provides description -> fill it into prd.md
43
+ 4. If multiple tasks pending -> auto-suggest ranking
44
+ 5. Auto-sync: `python .qoder/scripts/team_sync.py push`
45
+
46
+ ### list
47
+ Run `python .qoder/scripts/task.py list` and show as table:
48
+ | ID | Name | Status | Priority | RICE | Assignee | Updated |
49
+
50
+ ### rank
51
+ 1. List all planning/pending tasks
52
+ 2. For each: estimate R, I, C, E
53
+ 3. Calculate RICE scores
54
+ 4. Show ranked result
55
+ 5. Ask: confirm order? Then persist scores to task.json
56
+
57
+ ### start
58
+ 1. Run `python .qoder/scripts/task.py start <name>`
59
+ 2. Status: planning -> in_progress, task becomes the active task
60
+ 3. Load PRD + context, ready for /wl-spec or /wl-code
61
+
62
+ ### finish
63
+ 1. Run `python .qoder/scripts/task.py finish`
64
+ 2. Status -> completed, active task pointer cleared
65
+ 3. Record to learning system
66
+ 4. Auto-sync: `python .qoder/scripts/team_sync.py push`
67
+
68
+ ### archive
69
+ 1. Run `python .qoder/scripts/task.py archive <name>`
70
+ 2. Moves task to .qoder/archive/{YYYY-MM}/
71
+ 3. Record completion metrics
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: wl-test
3
+ description: "Generate unit tests for implemented code. Needs confirmation."
4
+ argument-hint: "[class-name or file-path]"
5
+ auto-approve: false
6
+ allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
7
+ ---
8
+
9
+ # /wl-test - Generate Tests
10
+
11
+ User input: $ARGUMENTS
12
+
13
+ ## Step 1: Find Target Code
14
+
15
+ If class-name provided, search for it:
16
+ python .qoder/scripts/search_index.py <class-name>
17
+ If no argument, use current task's implemented code.
18
+
19
+ ## Step 2: Read Code + Spec
20
+
21
+ Read the implementation file and related spec.
22
+ Understand what needs to be tested.
23
+
24
+ ## Step 3: Generate Tests
25
+
26
+ Read test-generator skill for testing workflow.
27
+ Generate tests covering:
28
+ 1. Happy path for each function
29
+ 2. Edge cases (null, empty, boundary values)
30
+ 3. Error handling
31
+ 4. Integration points
32
+
33
+ ## Step 4: Self-Check
34
+
35
+ - [ ] Tests are runnable
36
+ - [ ] Cover main scenarios
37
+ - [ ] Use proper assertions
38
+ - [ ] Follow team test conventions
39
+
40
+ ## Step 5: Report
41
+
42
+ Tell user what tests were generated and suggest /wl-commit next.
@@ -0,0 +1,5 @@
1
+ # Qoder CLI 项目级配置
2
+ # 文档: https://docs.qoder.com/zh/cli/permissions
3
+
4
+ # 权限模式: auto = 自动批准 (不弹确认)
5
+ approval_mode = "auto"