@hupan56/wlkj 2.4.5 → 2.4.7
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 +11 -0
- package/package.json +1 -1
- package/templates/qoder/commands/wl-prd.md +43 -10
- package/templates/qoder/hooks/inject-workflow-state.py +14 -0
- package/templates/qoder/hooks/session-start.py +17 -0
- package/templates/qoder/scripts/git_sync.py +313 -641
- package/templates/qoder/scripts/syncgate.py +9 -0
- package/templates/qoder/scripts/team_sync.py +15 -5
|
@@ -275,6 +275,15 @@ def check_eval_gate(
|
|
|
275
275
|
full = os.path.join(repo_root, prd) if not os.path.isabs(prd) else prd
|
|
276
276
|
if not os.path.isfile(full):
|
|
277
277
|
continue
|
|
278
|
+
# PRD-3: Quick 模式 PRD 跳过 A3 (字段引用检查)
|
|
279
|
+
# Mini-PRD 格式精简, A3 的表格字段检查不适用
|
|
280
|
+
try:
|
|
281
|
+
with open(full, 'r', encoding='utf-8', errors='replace') as f:
|
|
282
|
+
head = f.read(2048)
|
|
283
|
+
if 'mode: quick' in head.lower():
|
|
284
|
+
continue # Quick 模式, 跳过 EVA
|
|
285
|
+
except OSError:
|
|
286
|
+
pass
|
|
278
287
|
# 找同名原型 (可选)
|
|
279
288
|
dirname = os.path.dirname(full)
|
|
280
289
|
base = os.path.splitext(os.path.basename(full))[0]
|
|
@@ -145,10 +145,16 @@ def report_conflict(stderr):
|
|
|
145
145
|
# autostash 风险检查: --autostash 可能在 abort 后留下未弹回的 stash
|
|
146
146
|
stash_r = git('stash', 'list')
|
|
147
147
|
if stash_r.returncode == 0 and stash_r.stdout.strip():
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
stash_lines = [l for l in stash_r.stdout.strip().split('\n') if l.strip()]
|
|
149
|
+
if stash_lines:
|
|
150
|
+
print('检测到 {} 个 stash (可能是 autostash 未弹回), 尝试自动恢复...'.format(len(stash_lines)))
|
|
151
|
+
# P1-6: 自动尝试 stash pop 恢复用户的草稿
|
|
152
|
+
pop_r = git('stash', 'pop')
|
|
153
|
+
if pop_r.returncode == 0:
|
|
154
|
+
print(' [OK] stash 已自动恢复 (你的改动回来了)')
|
|
155
|
+
else:
|
|
156
|
+
print(' WARNING: stash pop 失败, 你的改动可能还在 stash 里')
|
|
157
|
+
print(' 手动恢复: git stash list → git stash pop')
|
|
152
158
|
print('SYNC_CONFLICT: 自动同步遇到冲突, 已安全回退 (本地产出未丢失)。')
|
|
153
159
|
branch = current_branch()
|
|
154
160
|
print('AI 请按以下步骤解决冲突:')
|
|
@@ -264,7 +270,11 @@ def _stage_scopes_safely(skip_secret=False):
|
|
|
264
270
|
fpath = line[3:]
|
|
265
271
|
if status[0] == '?' or status[1] == '?': # 未跟踪
|
|
266
272
|
ext = os.path.splitext(fpath)[1].lower()
|
|
267
|
-
|
|
273
|
+
# PRD-4: 拒绝 brainstorm 中间文件
|
|
274
|
+
basename = os.path.basename(fpath)
|
|
275
|
+
if 'brainstorm-agent' in basename:
|
|
276
|
+
skipped.append(fpath + ' (brainstorm 中间文件, 不提交)')
|
|
277
|
+
elif ext in SAFE_EXTENSIONS:
|
|
268
278
|
git('add', '--', fpath)
|
|
269
279
|
staged += 1
|
|
270
280
|
else:
|