diff --git a/apps/cli/ai/agent.ts b/apps/cli/ai/agent.ts index 8d13b06cba..5c803a932c 100644 --- a/apps/cli/ai/agent.ts +++ b/apps/cli/ai/agent.ts @@ -55,7 +55,7 @@ export function startAiAgent( config: AiAgentConfig ): Query { prompt, env, model = DEFAULT_MODEL, - maxTurns = 75, + maxTurns = 100, resume, autoApprove, activeSite, diff --git a/apps/cli/ai/plugin/skills/blockify/SKILL.md b/apps/cli/ai/plugin/skills/blockify/SKILL.md new file mode 100644 index 0000000000..4c3acde0f1 --- /dev/null +++ b/apps/cli/ai/plugin/skills/blockify/SKILL.md @@ -0,0 +1,240 @@ +--- +name: blockify +description: Convert HTML content to native Gutenberg block markup. Invoke this any time you need to translate raw HTML (a section, a full page, a file on disk, a snippet in the conversation) into valid block markup. Works on any input — not scoped to a site, a post, or a theme. +user-invokable: true +--- + +# Blockify — HTML to Gutenberg blocks + +Convert HTML input into native Gutenberg block markup. The goal is **FAITHFUL CONVERSION**: reproduce the same DOM using native blocks, preserve every className, and only fall back to `core/html` for truly non-convertible elements. + +## Input and output + +- **Input**: any HTML — a single section, a full page, a file you `Read`, a snippet the user pasted, the `post_content` of an existing post fetched via `wp_cli post get`. This skill does not care where the HTML came from. +- **Output**: valid Gutenberg block markup that renders the same visual DOM. Return it inline in your response, write it to a file with `Write`/`Edit`, or apply it with `wp_cli post update` — whichever the caller asked for. +- **Out of scope**: this skill does not modify CSS or theme files itself. It provides the HTML → block markup translation AND the CSS selector adjustments you MUST make when porting prototype CSS to a block theme (see "CSS migration after conversion" below) so the theme renders identically to the prototype. + +## Decompose — do not give up on a section + +Never wrap an entire section in `core/html` just because some of its children are non-convertible. Break sections apart: convert every convertible child to a native block and isolate only the truly non-convertible child as its own `core/html` block. + +Example: a hero `
` with a heading, paragraph, buttons, image, AND a scroll-indicator animation becomes `core/group` > `core/heading` + `core/paragraph` + `core/buttons` + `core/image` + `core/html` (scroll indicator only). Do NOT keep the entire hero as `core/html`. + +## Translation table + +| HTML | Gutenberg block | +|------|----------------| +| `
`, `
`, `
`, `