docs: lead the RFC with plan mode; session mode is the mechanism

The deliverable is plan mode — retitle and reorder the proposal opener so
the feature leads and the logged session-mode state is its implementation
property. Fix the Codex citation in the boolean-planMode alternative: Codex
has plan mode (/plan); its ACP mode list carries its approval presets — two
different surfaces. Durable vocabulary (mode/set, ctx.modes, dsh-mode) stays
string-shaped so a second mode never renames logged event types.
This commit is contained in:
kingwl
2026-07-07 16:19:19 +08:00
parent 61847183ad
commit 27012ce4dd
4 changed files with 9 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ Generated by `pnpm run gen-rfc-index` from the RFC tree — never edit by hand;
| [Multiplex concurrent ACP sessions over one connection](proposed/feature/2026-06-14-acp-multi-session.md) | 2026-06-14 |
| [Optional Code Mode — model writes TypeScript against an SDK of all tools](proposed/feature/2026-06-15-optional-code-mode.md) | 2026-06-15 |
| [Pre-tool input rewrite — a consistent design](proposed/feature/2026-06-30-pre-tool-input-rewrite.md) | 2026-06-30 |
| [Session modesplan mode as logged per-agent policy state](proposed/feature/2026-07-07-session-modes-plan-mode.md) | 2026-07-07 |
| [Plan mode — a logged per-agent session mode](proposed/feature/2026-07-07-session-modes-plan-mode.md) | 2026-07-07 |
### Simplification

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
2026-07-07-session-modes-plan-mode.md: f07f032791a97dc1954edf00ff9bd911d1834eb8
2026-07-07-session-modes-plan-mode.zh.md: a97e4d4f72edb63016e853f6858f9f856b2cd89e
2026-07-07-session-modes-plan-mode.md: 8ae896e62d564bc77870d7449992e9eaccf577c5
2026-07-07-session-modes-plan-mode.zh.md: 3bde47ea5491c69f56f49e3fcff9a6eed49d52e4

View File

@@ -1,4 +1,4 @@
# RFC: Session modesplan mode as logged per-agent policy state
# RFC: Plan mode — a logged per-agent session mode
Status: proposed
@@ -14,7 +14,7 @@ The ecosystems that leave modes to convention show the failure shapes to avoid.
## Proposal
A **session mode** is a named, logged, per-agent policy state. Mode definitions — which tools stay visible, what guidance section renders — are deployment config; the mode IN FORCE for an agent is session state, folded from its log. One new product package, `@deepseek-ai/dsh-mode` at `packages/mode/mode/` (a new top-level group, the `packages/approval/` shape), owns the event vocabulary, a thin `ctx.modes` service, and every policy listener; the loop does not change. The harness ships exactly one built-in definition: `plan`.
The deliverable is **plan mode**. It ships as the first **session mode** a named, logged, per-agent policy state: mode definitions — which tools stay visible, what guidance section renders — are deployment config, and the mode IN FORCE for an agent is session state, folded from its log. One new product package, `@deepseek-ai/dsh-mode` at `packages/mode/mode/` (a new top-level group, the `packages/approval/` shape), owns the event vocabulary, a thin `ctx.modes` service, and every policy listener; the loop does not change. `plan` is the only shipped definition — the mode-shaped vocabulary exists so a second mode never renames durable event types, not because more modes ship now.
### The mode state is a session event
@@ -140,7 +140,7 @@ Deferred beyond this landing, each behind its own decision: subagent mode inheri
**A plan-file store (`.plans/` directory).** A second durable home for what the log already carries replayably; a deployment wanting files can add a tool that writes them. One home per fact.
**A boolean `planMode` instead of named modes.** Too narrow for the surface the repo already tracks (ACP advertises a mode LIST; Codex ships three), and generalizing later would rename the event vocabulary. The generic mechanism costs nothing extra now; only `plan` ships as a definition.
**A boolean `planMode` instead of named modes.** Too narrow for the surface the repo already tracks: ACP advertises a mode LIST, Claude Code's picker lists `plan` beside `acceptEdits`, and Codex — whose plan feature is `/plan` — fills its list with its approval presets (read-only / agent / full-access); generalizing later would rename durable event vocabulary. The string-shaped mechanism costs nothing extra now; only `plan` ships as a definition.
**A tool-policy-stack service (the Pi-critique remedy).** A dedicated composition service for tool policies is premature: waterfall listeners compose by construction, and the deny-by-default hard gate makes filter-order races non-exploitable. Formalize only if real conflicts appear.

View File

@@ -1,4 +1,4 @@
# RFC: 会话模式——plan mode 作为日志化的每-agent 策略态
# RFC: Plan mode——日志化的每-agent 会话模式
Status: proposed
@@ -14,7 +14,7 @@ harness 目前没有办法把一个 agent 置入低权限的工作状态。最
## 提案
**会话模式session mode**一个命名的、日志化的、每-agent 的策略状态模式定义——哪些工具保持可见、渲染哪段指导 section——是部署配置对某个 agent **生效中**的模式则是会话状态,从它的日志 fold 出来。一个新的 product 包 `@deepseek-ai/dsh-mode`(位于 `packages/mode/mode/`,新顶层组,`packages/approval/` 的形态)拥有事件词汇、一个薄薄的 `ctx.modes` 服务和全部策略 listenerloop 不改。harness 只内置一个定义:`plan`
交付物是 **plan mode**。它以第一个**会话模式session mode**的形态发布——一个命名的、日志化的、每-agent 的策略状态模式定义——哪些工具保持可见、渲染哪段指导 section——是部署配置对某个 agent **生效中**的模式则是会话状态,从它的日志 fold 出来。一个新的 product 包 `@deepseek-ai/dsh-mode`(位于 `packages/mode/mode/`,新顶层组,`packages/approval/` 的形态)拥有事件词汇、一个薄薄的 `ctx.modes` 服务和全部策略 listenerloop 不改。`plan` 是唯一发布的定义——模式形态的词汇存在是为了第二个模式到来时不必重命名持久事件类型,不是为了现在就发布更多模式
### 模式状态是一条会话事件
@@ -140,7 +140,7 @@ plan mode 是一个 feature就作为一个整体落地。一个能被锁进
**计划文件存储(`.plans/` 目录)。**为日志已能可回放地携带的东西建第二个持久之家;想要文件的部署可以后加一个写文件的工具。一个事实一个家。
**用布尔 `planMode` 而不是命名模式。**对仓库已经跟踪的表面太窄ACP 通告的是模式**列表**Codex 发布三个),日后泛化还要重命名事件词汇。通用机制现在零额外成本;只有 `plan` 作为定义发布。
**用布尔 `planMode` 而不是命名模式。**对仓库已经跟踪的表面太窄ACP 通告的是模式**列表**Claude Code 的选择器里 `plan``acceptEdits` 并列,而 Codex——它的 plan 功能是 `/plan`——用自己的审批预设read-only / agent / full-access填充列表日后泛化还要重命名持久事件词汇。字符串形态的机制现在零额外成本;只有 `plan` 作为定义发布。
**工具策略栈服务(对 Pi 批评的对症药)。**专门的工具策略组合服务为时过早waterfall listener 靠构造可组合deny-by-default 硬闸门让过滤顺序竞争无法被利用。真冲突出现再机制化。