6 Commits

Author SHA1 Message Date
ymq
4d543f529c fix(qa-feedback): raise_problem 归一化 question,修复 QC 改进意见丢失(1241)
根因:QC 审核的决策里 questions 是 list(7 条改进意见数组),qc_review_run 把
decision.get("questions") 直接传给 raise_problem 的 question 参数,而 raise_problem
未做 str 化,导致 INSERT pipeline_agent_questions 时 question 字段是 list,MySQL 报
OperationalError(1241, 'Operand should contain 1 column(s)'),改进意见根本没落库。

后果链:QC 意见丢失 → develop 重做时 _build_qna_section 读不到任何 pending 退回意见
→ 每次裸重做(看不到「为什么被驳回、该怎么改」)→ 反复产出同样的空交付件。

修复:raise_problem 里 question 若为 list/tuple,先 join 成换行字符串再入库。
2026-08-19 18:34:58 +08:00
ymq
7fa501d359 feat(audit): question 迁移接 record_audit
raise_problem(raise)/resolve_problem(resolve)/escalate_problem(escalate) 都写审计,
问题流转轨迹 append-only 可追溯(谁+何时+from→to)
2026-08-16 23:55:14 +08:00
ymq
bf819f3b79 refactor(agent_loop): 状态机迁移走 task 能力 + 角色规范化 agent.{role}
- 角色规范: agent 角色 agent.{role}(_normalize_role 补前缀+ROLE_ALIASES/ROLE_CHAIN/SDL_ROLES 改规范名),
  人角色 {orgtype}.{role}(默认 owner.superuser)
- role_agent_run/pm_review_run/handle_failed_task 硬编码状态 SQL 改 task_capability 工具
  (submit/approve/reject/complete/mark_failed/retry,CAS+审计)
- communication/questions/sdlc_ability 默认 handler 角色规范化(main_agent→agent.main_agent, customer→owner.superuser)
- 通用助手路径(AgentExecutor)不动,保持 hermes 式自由对话
2026-08-16 23:51:55 +08:00
ymq
b4e5e20ccf fix(communication): _rec_to_dict 用 dict(rec) 取列,修复 DictObject 列名取不到问题
sqlor 返回 DictObject,列名不暴露为实例属性(dir() 只列 dict 方法),
dir(rec)+getattr 会取到 None。改 dict(rec),questions.get_question 同步修复。
2026-08-16 22:14:44 +08:00
ymq
6707cabedc refactor(team-communication): 问题冒泡改为显式路由,规范移交 skill
规范(团队角色/问题类型/冒泡路径)移交 team-communication skill,由 LLM 读 skill 决策;
系统只固化通用问题工具,不读配置表、不存路径快照:
- communication.py: raise/resolve/escalate/list_for 显式路由,
  escalate 显式传 next_handler;current_handler_role/agentid 两列确定性过滤
- questions.py: 向后兼容层适配
- agent_loop.py: need_info/review_reject/fault_report 显式 first_handler_role
- sdlc_ability.py: escalate_question 显式转 customer
- models: 去 escalation_path/pos,加 current_handler_role/agentid
2026-08-16 22:08:00 +08:00
ymq
4f2c6da6cf feat(team-communication): 通用问题冒泡引擎(多agent感知)
- communication.py: raise/resolve/escalate/list_for,问题类型→冒泡路径,处理方=role+agentid
- questions.py: 向后兼容层,委托 communication
- agent_loop.py: 角色提问(need_info)/PM退回(review_reject)/故障(fault_report)走 raise_problem;
  _build_qna_section 按 handler 路由注入;PM approved 只答结 review_reject
- sdlc_ability.py: list_questions/answer_question/escalate_question 按 handler 路由
- models: pipeline_agent_questions 加 from_agentid/problem_type/escalation_path/escalation_pos
2026-08-16 21:25:39 +08:00