Skip to content

Commit fb60435

Browse files
cmp0xffcodex
andcommitted
DOC: Clarify clean-context plan execution
The Plan Mode documentation described skills as simply omitted and did not explain the authority, provenance, resumability, or file-history behavior of a clean implementation handoff. Document the user-role plan submission, current compact skill rediscovery, planned and implementation badges, unchanged workspace, resumable source session, and best-effort checkpoint inheritance. Duplicating full skill documents in the handoff was rejected because that would defeat the clean-context guarantee. Verified both language variants against the implemented flow; git diff --check, npm run check, and npm test pass. Co-authored-by: Codex <noreply@openai.com>
1 parent 1769f2e commit fb60435

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎docs/plan-mode.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,15 @@ Plan Mode 的核心规则是**只规划,不动手**。例如以下操作是**
9292
| **1. implement this plan** | 退出 Plan Mode,自动发送实现指令,让 AI 开始按方案写代码 |
9393
| **2. stay in Plan mode** | 保持在 Plan Mode,继续修改或完善方案 |
9494
| **3. switch to Default mode** | 退出 Plan Mode,回到默认模式(不自动开始实现) |
95-
| **4. clear context and implement this plan** | 派生一个干净的新会话(仅携带系统提示、运行上下文、AGENTS.md 指令与方案),在全新上下文中开始实现 |
95+
| **4. clear context and implement this plan** | 使用当前系统提示、运行上下文、AGENTS.md 指令及仍可用 skills 的精简目录派生干净会话,再把已批准方案作为第一条用户消息提交 |
9696

97-
注意:该选项不会把规划阶段加载的 skills 带入新会话;实现时可按需通过 skill 工具重新加载。
97+
该交接不会复制规划对话、工具输出或完整 skill 文档。规划阶段曾展示或加载的 skills 会按当前配置重新扫描,
98+
只保留仍存在的名称和最新描述。完整交接指令与方案以用户角色提交,因此会再次经过正常的 skill 自动匹配,
99+
实现会话也能按通常方式加载匹配的 skill。
100+
101+
工作区内容不会改变。已完成的源会话会保留并标记为 `planned`,可随时恢复;干净会话标记为
102+
`implementation`。文件历史按最佳努力继承:若源会话已有 checkpoint,实现会话会从该 checkpoint 开始,
103+
以便继续使用 `/undo`;文件历史仓库缺失则不会阻止交接。
98104

99105
你可以用数字键 `1-4` 直接选择,也可以用 `↑/↓` 移动光标后按 `Enter` 确认。按 `Esc` 等同于选择 "stay in Plan mode"。
100106

‎docs/plan-mode_en.md‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,17 @@ After the plan is output, Deep Code automatically shows a choice dialog—no ext
9292
| **1. implement this plan** | Leave Plan Mode and automatically send an implementation prompt so the AI starts coding |
9393
| **2. stay in Plan mode** | Stay in Plan Mode to continue refining the plan |
9494
| **3. switch to Default mode** | Leave Plan Mode and return to Default mode without starting implementation |
95-
| **4. clear context and implement this plan** | Derive a clean new session (carrying only the system prompt, runtime context, AGENTS.md instructions, and the plan) to implement in a fresh context |
95+
| **4. clear context and implement this plan** | Derive a clean session with the current system prompt, runtime context, AGENTS.md instructions, and a compact catalog of still-available skills; then submit the approved plan as its first user message |
9696

97-
Note: skills loaded during planning are not carried over; implementation can reload them via the skill tool as needed.
97+
The handoff does not copy planning dialogue, tool output, or full skill documents. Skills advertised or loaded while
98+
planning are rediscovered from the current configuration, and only their current names and descriptions are retained.
99+
Because the complete handoff and plan are submitted in the user role, normal automatic skill matching runs again and
100+
the implementation session can load any matching skill normally.
101+
102+
The workspace is unchanged. Deep Code keeps the completed source session available to resume and marks it `planned`;
103+
the clean session is marked `implementation`. File-history inheritance is best effort: when the source has a checkpoint,
104+
the implementation session starts from it so `/undo` remains useful, while a missing file-history repository does not
105+
block the handoff.
98106

99107
You can press `1-4` to select directly, or use `↑/↓` to move the cursor and `Enter` to confirm. Pressing `Esc` is equivalent to choosing "stay in Plan mode."
100108

0 commit comments

Comments
 (0)