# Capability: Create from a document

## Intent phrases

- create from Google Doc
- import from document
- build page from a brief
- build article from Drive
- create from Figma and copy

## Requires capabilities

`pages` or `articles`

## Prerequisites

- Fetch package materials (Google Drive MCP, paste, Figma link, zip, production ref, or mix)
- Read `cms-edit://customer/components-index`, `routing`, and for articles **`articles`**
- **Non-trivial packages:** complete **`task-source-readiness-review`** first (inventory → beat sheet → verdict → light human yes)

## Steps

### Phase 0 — Source readiness (mandatory for external packages)

1. Run **`task-source-readiness-review`** (or follow it inline).
2. Accept multi-source packages — not only a single Google Doc (Drive assets + Figma sequence + copy doc is normal).
3. On **NO-GO**, stop. On **GO** / **GO-WITH-GAPS**, keep the soft-proof as the build plan.
4. **Do not rewrite source copy.** Structure and place only.

### Phase 1 — Plan and create

1. Read `cms-edit://customer/tasks-index` and relevant playbooks (`articles` / `pages`).
2. Map soft-proof beats to **registered** component types only — prefer **source order** over CMS convenience (do not invent side-by-side pairs unless the source is a true pair).
3. **Propose plan** (can reuse the soft-proof): slug, title, template/article type, ordered component list, gap/placeholder list — **ask user to confirm** with a light **yes** if not already confirmed.
4. For pages: `list --type template` — pick template; check template `preContent` / `postContent` so heroes are not duplicated.
5. For articles: resolve `articleType`; apply site SEO and lab rules from `articles` playbook.
6. Build `create from-json` payload **or** prefer incremental `open` → `add` / `set` / `rtf` for large multi-block work.
7. `cms_edit ["create", "from-json", "--json", "<compact-json>", "--dry-run", "--strict"]` when using JSON (or `--json-base64` for large payloads).
8. On approval, create and `save`.
9. `cms_edit ["preview", "urls", "<slug>"]` — follow **`task-preview-verify`** (including multi-block soft-proof QA when relevant).
10. Remind user to publish in Contentful UI (never publish lab entries unless explicitly asked).

Use MCP prompts `cms_edit_create_from_doc` or `cms_edit_create_article_from_doc` when available — still run readiness first for external packages.

## Confirmation gates

1. Source readiness verdict + soft-proof (non-trivial packages)
2. Plain-English plan — light human **yes** before create
3. `--dry-run --strict` when using from-json
4. `diff` before `save`

## Out of scope

- Publish
- **Rewriting source copy** (flag only)
- Asset upload without reuse check (see **Media** capability)
- Inventing layout, section titles, or pair collections absent from the source

## Related resources

- `cms-edit://customer/components-index`
- `cms-edit://customer/articles` / `pages`
- `task-source-readiness-review`
- `task-create-article`
- `task-create-page`
- `task-media-reuse-and-upload`
- `task-preview-verify`
