Skip to content

Docs: explain native intent styling with executable examples - #138

Merged
noeltock merged 2 commits into
mainfrom
docs/130-native-intent-styling
Oct 4, 2026
Merged

noeltock merged 2 commits into
mainfrom
docs/130-native-intent-styling

Conversation

@noeltock

@noeltock noeltock commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Problem

The guide incorrectly described intent trees as unable to carry styling, encouraging unnecessary HTML conversion. It also lacked current alignment and headerless-table examples and treated one image/text mapping as universal. Closes #130.

Solution

Explain explicit native attributes versus interpretation of authored HTML/CSS. Add an executable styling and headerless-table example, plus a short sequential realize snippet using the existing API. Keep generic structural defaults while allowing verified theme layout contracts.

Behaviour / guidance Read first Proof
Styled native content stays on the intent route skills/block-runner/references/GUIDE.md Corrected routing and native example
Native attributes, layout and headerless cells survive assembly skills/block-runner/references/ASSEMBLE.md; dev/test/intent.test.ts Test extracts and executes the documented JSON
Several inputs retain separate finalized reports docs/reference.md Executed sequential snippet
Installed skill carries the guidance skills/block-runner/references Fresh local installation checked

Diff

+109 / −9 across five files.

 command routing
- styled content -> convert; intent carries no styling
+ explicit native attrs -> assemble
+ existing authored HTML/CSS requiring interpretation -> convert
 assembly guide
+ native colour, spacing, alignment, layout and headerless table example
- image/text rows: never columns
+ Media & Text default; verified theme contracts can require Columns
 library reference
+ sequential realize calls, one report per input

Testing & verification

Reviewed revision: 0590aa5b0d0f33952cd4d8d226e92b86c7576d76 · Environment: Node 24.18.0, macOS arm64.

  • npx vitest run dev/test/skill.test.ts dev/test/engine-skill.test.ts dev/test/intent.test.ts: 44 passed, including the documented JSON through realize and parsed-attribute assertions.
  • npm run typecheck, git diff --check, and npm run build: passed.
  • Extracted and executed the sequential library snippet: two successful reports, one and three valid blocks respectively, zero warnings.
  • node dist/cli.js skill --install --dir <fresh-temp-directory>: installed both edited references; commands remain version-pinned.
  • Deterministic npm run bench before and after the intent fixes: all 63 SCORE values unchanged.
  • Full PR CI passed: https://github.com/humanmade/block-runner/actions/runs/37178345921 (751 tests, four existing skips; Node 20/22/24, package consumers, WordPress proof and scope gate).

Not verified: new model behavior or target-theme/editor presentation. No model benchmark ran; the guide distinguishes pinned headless support from destination proof.

Risk / rollout

Guidance changes the recommended authoring route for explicit native styles. Generic structure and visible-container defaults remain; no runtime feature, batch runner, or expected benchmark tree is added.

Detection: executable guide regression and skill contracts. Rollback: revert this documentation and its example test.

@noeltock
noeltock merged commit d739287 into main Oct 4, 2026
9 checks passed
@noeltock
noeltock deleted the docs/130-native-intent-styling branch October 4, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill: explain native styling and attribute shapes on the intent path

1 participant