@hupan56/wlkj 2.4.3 → 2.4.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hupan56/wlkj",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "AI Product R&D Workflow - PRD/Prototype/Search/Task/Report",
5
5
  "bin": {
6
6
  "wlkj": "bin/cli.js"
@@ -159,6 +159,9 @@ fields / non-canonical colors) and re-run until PASS. Then ask user to
159
159
  confirm publishing to workspace/specs/prd/.
160
160
  After publishing (and also after saving drafts/prototypes), run:
161
161
  ```bash
162
+ # 1. 归档到 data/docs/prd/ (立刻可搜, 不用等周五 cron)
163
+ python .qoder/scripts/collect_prds.py
164
+ # 2. 推送到团队
162
165
  python .qoder/scripts/team_sync.py push
163
166
  ```
164
167
  This silently commits & pushes the PM's outputs to the team repo.
@@ -188,7 +188,9 @@ def _compute_and_print(query, platform, page_type):
188
188
  ranked = sorted(hits.items(), key=lambda x: len(x[1]), reverse=True)[:12]
189
189
  print('\n## 1. 相关代码文件 ({} 个, 取前 12)'.format(len(hits)))
190
190
  for f, kws in ranked:
191
- print('- {} (命中: {})'.format(f, ','.join(sorted(kws)[:3])))
191
+ # 加完整路径前缀, AI 用 Read 工具能直接读
192
+ full = 'data/code/' + f.replace('\\', '/')
193
+ print('- {} (命中: {}) -> {}'.format(f, ','.join(sorted(kws)[:3]), full))
192
194
  if not hits:
193
195
  print('- (无命中 — 换业务词重试, 或该功能为全新)')
194
196
 
@@ -315,7 +315,9 @@ def _search_keywords_impl(query, platform=None):
315
315
  for f in fs[:3]:
316
316
  parts = f.replace('\\', '/').split('/')
317
317
  short = '/'.join(parts[:2]) + '/.../' + '/'.join(parts[-2:]) if len(parts) > 5 else '/'.join(parts)
318
- print(' ' + short)
318
+ # 输出完整路径前缀, 让 AI 用 Read 工具能直接读 (不用猜路径)
319
+ full = 'data/code/' + f.replace('\\', '/')
320
+ print(' ' + short + ' -> ' + full)
319
321
  print()
320
322
  print('Total: {} matches'.format(total))
321
323
 
@@ -193,6 +193,12 @@ def do_pull(quiet=False):
193
193
  print('Already up to date.')
194
194
  else:
195
195
  print('Pulled latest from team.')
196
+ # 拉到队友的新 PRD → 自动 collect 到 data/docs/prd/ (历史归档)
197
+ try:
198
+ from git_sync import collect_prds
199
+ collect_prds()
200
+ except Exception:
201
+ pass # collect 失败不阻塞 pull
196
202
  return 0
197
203
 
198
204
 
@@ -382,6 +388,13 @@ def _do_push_locked(message, dev, skip_eval, skip_secret):
382
388
  if r.returncode == 0:
383
389
  touch_pull_marker()
384
390
  print('Synced to team. (attempt {})'.format(attempt))
391
+ # push 成功后, 自动 collect PRD 到 data/docs/prd/ (历史归档)
392
+ # 这样 search_index --prd 能立刻搜到新 PRD, 不用等周五 cron
393
+ try:
394
+ from git_sync import collect_prds
395
+ collect_prds()
396
+ except Exception as e:
397
+ print('[sync] PRD 归档跳过 (不阻塞): ' + str(e)[:80])
385
398
  # D2: 检测 PRD 发布并推飞书通知
386
399
  _notify_prd_publications(staged_files)
387
400
  return 0
@@ -67,10 +67,15 @@ trigger: "用户描述需求、要 PRD、要原型、要 mockup,或直接 /wl-
67
67
  python .qoder/scripts/eval_prd.py <draft-prd.md> <prototype.html>
68
68
  ```
69
69
  <80% 就修到 PASS。
70
- 6. 发布 + 自动同步:
70
+ 6. 发布 + 归档 + 同步(3 合 1):
71
71
  ```bash
72
+ # a. 归档到 data/docs/prd/ (立刻可搜, 不用等 cron)
73
+ python .qoder/scripts/collect_prds.py
74
+ # b. 推送到团队 (push 后也会自动再 collect 一次)
72
75
  python .qoder/scripts/team_sync.py push
73
76
  ```
77
+ > collect_prds 把你的 PRD 从 workspace/members/{你的名字}/drafts/ 拷到 data/docs/prd/,
78
+ > 这样 search_index --prd 立刻能搜到新 PRD。
74
79
 
75
80
  详细生成规则、样式 token、原型规则见:
76
81
  - 功能型 skill:`.qoder/skills/prd-generator/SKILL.md`