docs(skills): fix the broken examples and add the check that keeps them fixed - #446
Merged
Merged
Conversation
…em fixed
Seven examples in SKILL.md and rules/ no longer validated against the
binary a generating model is supposed to produce files for:
- chromatic-aberration.md used {"type":"icon","name":"zap"}; the field
is `icon` and it carries the set, "lucide:zap".
- shape-draw-start-and-path-morph.md used
shape: {"type":"path","data":…}; the schema is {"path":{"data":…}}.
Its expression example used `t`, which the evaluator rejects by name --
it is `$t`. motion-path.md repeated the same path spelling.
- whip-transition.md used the easing ease_in_out_cubic, which does not
exist.
- geometry-safety.md and SKILL.md showed the positional
`rustmotion validate scenario.json` and a render without -f, both
rejected by the CLI.
- gradient-quality.md's background template had no preset.
- dynamic-depth.md put `easing` on float_3d, which does not take one.
- text-component-parity.md said gradient_text's stops share the format
of a background's. They do not: gradient_text names the position
`position`, a background names it `offset`, and the validator refuses
the other. SKILL.md's gradient_text section mentioned neither `stops`
nor the angle convention at all.
The eighth item is the one that matters: a test extracts every fenced
json block from both documents, wraps a bare component in a minimal
scenario, and runs the real validator over it. 108 examples are covered.
Blocks marked **BAD, blocks carrying an ellipsis placeholder, and
transition objects are skipped, and the errors the wrapper itself causes
-- a missing asset path, an animation budget measured against an
invented scene length -- are filtered out, so what remains is a genuine
vocabulary error naming the file and the line.
Reaching the validator from an integration test needed two functions
re-exported from cli. Exporting the whole commands module instead leaked
private types through cmd_render's signature, which clippy refuses.
Closes #436
This was referenced Sep 29, 2026
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.
Closes #436. Part of #438.
Seven examples in
SKILL.mdandrules/no longer validated against the binary agenerating model is supposed to produce files for.
chromatic-aberration.md{"type":"icon","name":"zap"}— the field isicon, and it carries the set:"lucide:zap"shape-draw-start-and-path-morph.mdshape: {"type":"path","data":…}— the schema is{"path":{"data":…}}; and its expression usedt, which the evaluator rejects by name (unknown identifier \t`) — it is$t`motion-path.mdwhip-transition.mdease_in_out_cubic, which does not existgeometry-safety.md,SKILL.mdrustmotion validate scenario.json, and a render without-f— both rejected by the CLIgradient-quality.mdpresetdynamic-depth.mdeasingonfloat_3d, which does not take onetext-component-parity.md,SKILL.mdgradient_text's stops share a background's format. They do not:gradient_textnames the positionposition, a background names itoffset, and the validator refuses the other.SKILL.md'sgradient_textsection mentioned neitherstopsnor the angle conventionItem 7 (halo interpolation claims) needs no edit: #445 makes the code satisfy what
halo-shapes.mdandSKILL.mdalready said.The eighth item is the one that matters
every_json_example_in_the_skill_documents_still_validatesextracts every fencedjsonblock from both documents, wraps a bare component in a minimal scenario,and runs the real validator — schema and attribute checks — over it. 108
examples covered.
Skipped: blocks marked
**BAD(several files teach by showing the wrong formfirst), blocks carrying an ellipsis placeholder, and transition objects, which are
not components. Filtered out: the errors the wrapper itself causes — a missing
asset path, an animation budget measured against an invented scene length. What
remains is a genuine vocabulary error, named with its file and line:
A first version of the test passed while an example was deliberately broken: it
called
validate_scenarioonly, and the error above comes fromcheck_component_attrs. Both run now.Reaching the validator from an integration test needed two functions re-exported
from
cli. Exporting the wholecommandsmodule instead leaked private typesthrough
cmd_render's signature, which clippy refuses.cargo fmt --all --checkclean ·cargo clippy --workspace --all-targets --features rustmotion/studio -D warningsclean.