Skip to content

调整 Plan/Build Todo 语义#667

Merged
phantom5099 merged 2 commits into
1024XEngineer:mainfrom
Yumiue:codex/plan-build-todo-semantics-659
May 20, 2026
Merged

调整 Plan/Build Todo 语义#667
phantom5099 merged 2 commits into
1024XEngineer:mainfrom
Yumiue:codex/plan-build-todo-semantics-659

Conversation

@Yumiue
Copy link
Copy Markdown
Collaborator

@Yumiue Yumiue commented May 20, 2026

背景

Plan 模式当前会维护执行态 todo,导致从 plan 切到 build 时用户对 todo 的职责感知不清晰。按 #659 的目标,本 PR 将计划上下文和执行进度状态拆开:plan 只负责产出计划,build 才创建和推进当前 run 的 todo。

Closes #659

当前修改

  • plan/read-only 模式不再暴露或允许 todo_write,保留只读工具与 ask_user
  • plan prompt 不再强制 plan_spec.todos 非空,也不再要求 summary_candidate.active_todo_ids
  • runtime 保存 CurrentPlan 时不再把 PlanSpec.Todos 自动灌入 Session.Todos,旧 plan revision 替换也不再取消/继承 plan-owned todo。
  • build bootstrap 改为只要没有当前 Todo State 就提醒模型显式创建本轮执行 todo,即使存在 CurrentPlan 也不默认继承为 todo。
  • 更新 session todo 设计文档与相关测试,明确 CurrentPlanSession.Todos 的职责边界。

验证

  • go test -count=1 ./internal/promptasset ./internal/runtime ./internal/session ./internal/tools 通过。
  • go test ./... 已运行,但当前环境存在与本次改动无关的既有失败:internal/cli 的 Windows symlink/npm/open-browser 相关测试,以及 internal/memo 的日期断言。

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copy link
Copy Markdown

@fennoai fennoai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found 2 noteworthy issues after reviewing the diff across code quality, performance, security, and documentation accuracy passes.

Comment thread internal/runtime/todo_bootstrap.go Outdated
Comment thread internal/promptasset/templates/context/plan_mode_plan.md
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@phantom5099 phantom5099 merged commit b269041 into 1024XEngineer:main May 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

调整 Plan/Build Todo 语义

2 participants