Skip to content

Commit 1df3a77

Browse files
authored
docs(rfd): align plan identifier naming with schema (#2384)
1 parent 178c0dd commit 1df3a77

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎docs/rfds/plan-operations.mdx‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Add a new `SessionUpdate` variant — `plan_update` — that carries a `plan` fi
3232
| `file` | Agent provides a file URI containing the plan | `uri: string` |
3333
| `markdown` | Agent provides raw markdown text | `content: string` |
3434

35-
All variants carry a required `id: string` that identifies the plan, and an optional `_meta` for extensibility.
35+
All variants carry a required `planId: string` that identifies the plan, and an optional `_meta` for extensibility.
3636

37-
Additionally, introduce a `plan_removed` session update type that carries only a plan `id` to signal dismissal. This keeps `plan_update` focused purely on content updates and makes removal a distinct, self-describing event.
37+
Additionally, introduce a `plan_removed` session update type that carries only a `planId` to signal dismissal. This keeps `plan_update` focused purely on content updates and makes removal a distinct, self-describing event.
3838

3939
The existing `plan` session update type is **not modified** and continues to work as before. Agents that want multi-plan support, new plan formats, or removal capabilities use `plan_update` and `plan_removed` only when the client advertises `plan`; otherwise they fall back to the existing `plan` session update type.
4040

@@ -50,15 +50,15 @@ This field is optional. When present as `{}`, it signals the client supports the
5050

5151
### Multiple Plans
5252

53-
The `id` field on every plan variant identifies a specific plan.
53+
The `planId` field on every plan variant identifies a specific plan.
5454

55-
- Each `plan_update` targets the plan with the given `id`
55+
- Each `plan_update` targets the plan with the given `planId`
5656
- Client tracks plans by ID; updates replace the content of that specific plan
5757
- Different plans may use different types (e.g., one `items` plan and one `markdown` plan)
5858

5959
### Plan Removal
6060

61-
Agent sends a `plan_removed` session update with the plan's `id` to dismiss it. This is a separate session update type from `plan_update`, keeping content updates and lifecycle events distinct.
61+
Agent sends a `plan_removed` session update with the plan's `planId` to dismiss it. This is a separate session update type from `plan_update`, keeping content updates and lifecycle events distinct.
6262

6363
## Shiny future
6464

@@ -88,7 +88,7 @@ Item-based (`plan_update`):
8888
"sessionUpdate": "plan_update",
8989
"plan": {
9090
"type": "items",
91-
"id": "plan-1",
91+
"planId": "plan-1",
9292
"entries": [
9393
{ "content": "Step 1", "priority": "high", "status": "pending" }
9494
]
@@ -103,7 +103,7 @@ Markdown:
103103
"sessionUpdate": "plan_update",
104104
"plan": {
105105
"type": "markdown",
106-
"id": "plan-1",
106+
"planId": "plan-1",
107107
"content": "## Steps\n- [ ] Refactor module\n- [ ] Add tests"
108108
}
109109
}
@@ -116,7 +116,7 @@ File-based:
116116
"sessionUpdate": "plan_update",
117117
"plan": {
118118
"type": "file",
119-
"id": "design-doc",
119+
"planId": "design-doc",
120120
"uri": "file:///tmp/plan.md"
121121
}
122122
}
@@ -127,7 +127,7 @@ Removal:
127127
```json
128128
{
129129
"sessionUpdate": "plan_removed",
130-
"id": "plan-1"
130+
"planId": "plan-1"
131131
}
132132
```
133133

@@ -137,7 +137,7 @@ Removal:
137137
138138
### Why a new session update type instead of extending the existing `plan`?
139139

140-
The existing `plan` variant flattens `Plan`'s `entries` field directly into the `SessionUpdate` discriminated union object. Adding a nested `plan` field, optional `id`, and polymorphic types to the same variant would require breaking the existing format or complex dual-deserialization logic. A new `plan_update` variant avoids this, but agents must only send it to clients that advertised `plan`; clients that do not advertise support can continue to receive the existing `plan` update.
140+
The existing `plan` variant flattens `Plan`'s `entries` field directly into the `SessionUpdate` discriminated union object. Adding a nested `plan` field, optional `planId`, and polymorphic types to the same variant would require breaking the existing format or complex dual-deserialization logic. A new `plan_update` variant avoids this, but agents must only send it to clients that advertised `plan`; clients that do not advertise support can continue to receive the existing `plan` update.
141141

142142
### Why a separate `plan_removed` session update type instead of a removal variant inside `plan_update`?
143143

‎docs/rfds/v2/plan-variants.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For now, v2 should stabilize only the item-based plan content variant:
1717
"sessionUpdate": "plan_update",
1818
"plan": {
1919
"type": "items",
20-
"id": "plan-1",
20+
"planId": "plan-1",
2121
"entries": [
2222
{ "content": "Step 1", "priority": "high", "status": "pending" }
2323
]
@@ -54,7 +54,7 @@ ACP v2 should:
5454
- Add `sessionUpdate: "plan_update"` to the default v2 schema.
5555
- Stabilize only the `plan.type: "items"` content variant for now.
5656
- Keep unknown plan content variants parseable and preservable using the [v2 enum variant extension](/rfds/v2/enum-variant-extension) rules.
57-
- Require every plan content variant, including unknown future/custom variants, to carry a plan `id`.
57+
- Require every plan content variant, including unknown future/custom variants, to carry a `planId`.
5858
- Remove `ClientCapabilities.plan` from v2.
5959
- Keep `markdown`, `file`, and `plan_removed` behind `unstable_plan_operations` until the Plan Operations RFD settles.
6060

@@ -83,8 +83,8 @@ Clients that only understand item-based plans can still preserve or display unkn
8383
3. Leave `PlanFile`, `PlanMarkdown`, and `PlanRemoved` behind `unstable_plan_operations`.
8484
4. Remove `SessionUpdate::Plan` from the v2 schema and make `SessionUpdate::PlanUpdate` the default plan variant.
8585
5. Keep the removed `sessionUpdate: "plan"` discriminator rejected so it cannot be accepted as an unknown v2 update.
86-
6. Require `id` on unknown `PlanUpdateContent` fallback payloads.
87-
7. Document that adapters may map the v1 `plan` update to v2 `plan_update` with `id: "main"`.
86+
6. Require `planId` on unknown `PlanUpdateContent` fallback payloads.
87+
7. Document that adapters may map the v1 `plan` update to v2 `plan_update` with `planId: "main"`.
8888
8. Regenerate v2 schema docs so the default v2 surface shows only the item-based tagged plan shape.
8989

9090
## Frequently asked questions

0 commit comments

Comments
 (0)