feat(skill): add wp-block-post-content — raw block markup generation and validation#60
Open
marcel-za wants to merge 3 commits into
Open
feat(skill): add wp-block-post-content — raw block markup generation and validation#60marcel-za wants to merge 3 commits into
marcel-za wants to merge 3 commits into
Conversation
Add new wp-block-post-content skill for generating, editing, and debugging raw WordPress block comment markup in post content, patterns, and programmatic post creation. Includes a tiered validation protocol (WP-CLI round-trip, Node.js sandbox, Chrome DevTools, manual cross- reference), a core block markup reference with exact save() signatures, and a Node.js validate-markup.mjs script using the official WordPress block serialisation parser. Also adds two eval scenarios: fix-block-validation-error (DevTools MCP workflow for diagnosing validation errors) and generate-page-layout (structured markup generation with pre-insertion validation).
…on gates Expand core-block-markup-reference to WordPress 7.0: add image resized/ border-radius variants, button colour presets and inline font-size, group with background colour and background image overlay, column width and verticalAlignment, cover block with parallax/gradient, and a new inline style property ordering reference. Harden SKILL.md validation gates: Gate 2 (Tier 3 Chrome DevTools) is now mandatory for all static block content, /tmp/ paths are banned in favour of /wordpress/wp-content/uploads/, and a surgical content replacement pattern is added for updating single blocks without rebuilding post content. Update wp-block-validation.md: rewrite Tier 3 verification snippet with wp.data guard, document the non-block HTML comment footgun (silent Tier 1 pass / fatal Tier 3 fail) with diagnostic snippet and PHP fix, and reformat the diagnostic pipeline.
…cation section Replace inline wp eval command with wp eval-file in the Tier 1 description to match the hardened Procedure section and wp-block-validation.md. Also tighten the Tier 3 description to reference the verification snippet in wp-block-validation.md consistently.
Contributor
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Author
|
I linked my wordpress.org and Github accounts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
wp-block-post-contentskill for generating, editing, and debuggingraw WordPress block comment markup in post content, patterns, and programmatic
post creation (
wp_insert_post,wp_update_post,$wpdb->update).What's included
skills/wp-block-post-content/SKILL.mdA procedural skill with a three-gate validation process: WP-CLI
wp eval-fileround-trip (Gate 1), followed by mandatory Chrome DevTools JS
save()contractverification (Gate 2) for all static block content. Includes a surgical content
replacement pattern for updating single blocks without rebuilding full post content.
skills/wp-block-post-content/references/core-block-markup-reference.mdExact
save()output signatures for WordPress 7.0 core blocks, covering image(basic, resized, border-radius), buttons (colour presets, inline font-size), group
(background colour, background image overlay), columns (width, verticalAlignment),
cover (parallax/gradient), file, list, details, separator, and dynamic blocks.
Includes an inline style property ordering reference — wrong order passes PHP
validation but fails JS validation.
skills/wp-block-post-content/references/wp-block-validation.mdTiered validation reference (Tiers 1–4) with a rewritten Tier 3 Chrome DevTools
snippet, documentation of the non-block HTML comment footgun (silent Tier 1 pass /
fatal Tier 3 fail), and a PHP
preg_replacefix. Includes the full block validationdiagnostic pipeline.
skills/wp-block-post-content/scripts/validate-markup.mjsNode.js Tier 2 validator using
@wordpress/block-serialization-default-parser.Reads a file and reports any blocks with null
blockName.eval/scenarios/fix-block-validation-error.mdEval scenario for the Chrome DevTools MCP workflow for diagnosing and fixing
"unexpected or invalid content" errors.
eval/scenarios/generate-page-layout.mdEval scenario for structured block markup generation with mandatory pre-insertion
validation.
Relates to
Closes #57