[moz] feat(prompt): toolchain steps 加文档同步 + 司马懿/庞统 review 加需求-设计-编码一致性检查
改动: - toolchain_routes.py: issue_assigned/review_result/ci_failure steps 加文档同步 step - toolchain_handler.py: ToolchainConstraintsSection 加 §6 文档同步约束 + Red Flag - bootstrap.py: reviewer 硬约束加需求-设计-编码一致性检查 - ticker.py: 庞统 round review 三问第 2 问加 docs/design 同步确认 - prompt_composer.py: DeliveryChecklistSection 从弱提醒改为强制步骤 Closes #105
This commit is contained in:
@@ -650,9 +650,10 @@ async def _handle_pull_request_review(payload: Dict[str, Any]) -> None:
|
||||
else: # REQUEST_CHANGES
|
||||
tc_steps = [
|
||||
"按审查意见逐条修改代码",
|
||||
"文档同步:如审查涉及设计/接口变更,同步更新 docs/design/ 对应文档",
|
||||
"push 到原分支 → CI 自动跑",
|
||||
"CI 通过后等重新 Review",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)— 报告中必须说明文档是否需要更新及处理结果",
|
||||
]
|
||||
_send_toolchain_task(
|
||||
to_agent=pr_author,
|
||||
@@ -1034,10 +1035,11 @@ async def _handle_issues(payload: Dict[str, Any]) -> None:
|
||||
steps=[
|
||||
f"在开发目录执行 git 操作:\n a. git checkout main && git pull origin main\n b. git checkout -b fix/{issue_number}-{brief}",
|
||||
"编码 + 写 UT",
|
||||
"文档同步:如果本次改动涉及设计变更或接口变更,在同一分支更新 docs/design/ 对应文档。如无需更新,在 action report 中说明「文档无需更新」",
|
||||
f"git add -A && git commit -m \"[moz] fix: {issue_title[:30]}\" && git push origin fix/{issue_number}-{brief}",
|
||||
f"CI 通过后创建 PR(Gitea API: POST /repos/{repo}/pulls,head: fix/{issue_number}-{brief}, base: main)",
|
||||
f"CI 通过后创建 PR(Gitea API: POST /repos/{repo}/pulls,head: fix/{issue_number}-{brief}, base: main)— PR body 必须含 Closes #{issue_number}",
|
||||
"等 Review",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)— 报告中必须说明文档是否需要更新及处理结果",
|
||||
],
|
||||
context_data={
|
||||
"issue_number": issue_number,
|
||||
@@ -1153,7 +1155,8 @@ async def _handle_issue_comment(payload: Dict[str, Any]) -> None:
|
||||
steps=[
|
||||
"查看完整 CI 日志(PR 页面或 Gitea Actions 页面)",
|
||||
"根据 CI 日志判断失败原因类型:\n a. 代码问题(lint/test 失败)→ 修复失败的测试 → push 到原分支 → CI 自动重跑\n b. 基础设施问题(runner 环境/Python/venv/Gitea/网络故障)→ 在该仓库创建 Issue 指派 jiangwei-infra(见下方「需要创建 Issue 时」),label 必须包含 type/infrastructure",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)— 报告中说明判断的原因类型和执行的操作",
|
||||
"文档同步:如修复涉及设计/接口变更,同步更新 docs/design/ 对应文档",
|
||||
"提交 action report(POST http://localhost:8083/api/projects/_toolchain/tasks/<task_id>/comments,comment_type=action_report)— 报告中说明判断的原因类型和执行的操作,以及文档是否需要更新",
|
||||
],
|
||||
context_data={
|
||||
"pr_number": issue_number,
|
||||
|
||||
Reference in New Issue
Block a user