← All playbooks · Raw API
task-edit-draft-page
# Capability: Edit an existing draft page
## Intent phrases
- open my draft
- continue editing a draft page
- update an ai-edit page
## Requires capabilities
`pages`, `openDraftPage`
## Prerequisites
- Read `wp-cms-edit://customer/overview` (AI edit policy)
- Know the page slug or ID
## Find drafts
```
wp_cms_edit ["list-drafts"]
wp_cms_edit ["list-drafts", "--prefix", "ai-edit-"]
wp_cms_edit ["list-drafts", "--all"]
```
## Steps
1. `wp_cms_edit ["open", "--page-slug", "<slug>"]` (or `--page-id <id>`)
- Published marketing pages are blocked unless `--allow-published`
2. `wp_cms_edit ["snapshot"]`
3. `wp_cms_edit ["read", "@b1"]` (or other `@bN`)
4. `wp_cms_edit ["set", "@b1", "<field>", "<value>"]`
5. `wp_cms_edit ["diff"]` → `wp_cms_edit ["save"]`
To reload from WordPress after an external change: run `open` again on the same slug.
## Confirmation gates
1. State which draft slug you are opening
2. Show `diff` before `save`
## Out of scope
- Publish
- Opening published marketing pages without user approval
## Related resources
- `wp-cms-edit://customer/task-edit-scalar-fields`
- `wp-cms-edit://customer/blocks-index`