fix: 修复实际使用中发现的 4 个 bug

- todo_parser: 支持无方括号的短 ID 提取(G-001/H-000 格式)
  原来只认 [T-xxx] 方括号格式,非方括号行退化为全文当 ID
- arc_mode: parallel_review_mode 保留 arcPhase 字段
  原来写 state 时覆盖为 {enabled, updatedAt, projectRoot},丢失 phase
- airplan.py: 新增 --task-text CLI 参数
  原来 argparse 缺此参数,do 模式无法接收任务描述
- do_mode.main: 透传 task_text 给 enter_worker
  原来调 enter_worker(project_root, tid) 缺第三个参数
  P1-20 is_ui_task() 永远收到空字符串

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
AirLongDian
2026-06-11 14:42:18 +08:00
parent 90a0db005f
commit e7f46097fb
4 changed files with 15 additions and 5 deletions

View File

@@ -249,8 +249,11 @@ def parallel_review_mode(project_root: Path, todo_path: Path) -> dict:
markdown_lines.append(f"- `{g.name}`: {', '.join(g.task_ids)}{g.reason}")
paths["execution_plan_md"].write_text("\n".join(markdown_lines) + "\n", encoding="utf-8")
atomic_json_write(paths["state"], {"enabled": True, "updatedAt": now_iso(),
"projectRoot": str(project_root)})
# 保留 arcPhase 字段,避免 phase 被 reset 为 discussing
existing_state = safe_json_load(paths["state"]) or {}
state_payload = {**existing_state, "enabled": True, "updatedAt": now_iso(),
"projectRoot": str(project_root)}
atomic_json_write(paths["state"], state_payload)
return {"json_path": str(review_json_path), "markdown_path": str(review_md_path),
"execution_plan_json_path": str(paths["execution_plan_json"]),
"parallel_group_count": len(review.parallel_groups),