Skip to content

SKILL.md: two stale claims that make the generator write scenarios the schema rejects #192

Description

@LeadcodeDev

Both are in .claude/skills/rustmotion/SKILL.md, the file an LLM reads before generating. A wrong line there does not produce a warning — it produces invalid scenarios, repeatedly.

1. star / polygon are documented in a shape the schema rejects

Line 922:

Shape types: rect, circle, rounded_rect, ellipse, triangle, star (with points, default 5), polygon (with sides, default 6), path (with data SVG path string)

"star (with points)" reads as {"type":"shape","shape":"star","points":5}. ShapeType is externally tagged, so that fails:

$ shape: "star"
Error: ... invalid component — would be silently dropped at render: invalid type: unit variant, expected struct variant

$ shape: {"star": {"points": 6}}
Valid scenario

Fix: show the literal JSON for the tagged variants, e.g. {"star": {"points": 6}}, {"polygon": {"sides": 6}}, {"path": {"data": "M0 0 L10 10"}}, and keep the bare strings only for the unit variants.

2. The file still says motion-path does not exist

Line 2353:

motion-path does not exist in the current schema (leftover from the pre-CSS LayerStyle model) — there is no motion-path-following mechanism today.

That was true before #177. motion_path is now an animation effect with its own rule file, and CLAUDE.md recommends it over stacked translates. The skill contradicts both.

Fix: replace the paragraph with a pointer to rules/motion-path.md, and note the spelling — the effect is motion_path (snake_case), while the old removed style property was motion-path, which is exactly the kind of near-miss this note should now be preventing.

Prevention

crates/rustmotion-cli/tests/skill_files_match_disk.rs already guards the skill files against drifting from the copies on disk. It cannot catch a claim that is simply false. Worth considering a test that extracts JSON snippets from SKILL.md and runs them through validate — the star example would have failed it.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions