Block development: static vs dynamic blocks - #24
Conversation
|
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. |
|
@Jameswlepage, any guidance on how to run the evals to test that they work? |
|
@luisherranz right now this branch is out of date, so I would suggest working on that first then we can approach the evals. That is of course if you want to work on getting this in still, if not please comment and we can close. I am going through and trying to triage some cleanup. |
|
FWIW the skill itself looks good, so we just need to update the branch. |
|
@copilot can you fix the CI problem? |
What
Teach the block-development skill how to choose between static and dynamic rendering when creating a new block, and add eval scenarios to verify the decision.
Why
The skill had no guidance on this decision. Agents would default to whichever pattern they'd seen most in training data, leading to inconsistent choices: sometimes static when dynamic was clearly needed (e.g., Interactivity API blocks, blocks in template parts), and sometimes dynamic for simple presentational blocks where static is fine. A priority-ordered checklist eliminates the guesswork.
How
references/static-vs-dynamic-blocks.md: a "first YES wins" decision checklist covering external data, evolving markup, Interactivity API, block themes, server-side needs, content portability, and simple presentational blocks.SKILL.mdstep 3 ("Pick the right block model") to point to the new reference and simplify the interactivity guidance into a single line that loadswp-interactivity-api.block-create-interactive-inner-blockseval to include the static-vs-dynamic decision step, since Interactivity API requires dynamic rendering.