From 00c6fd238e09c171e14a41ea85d47dc9f7ab7c67 Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Wed, 22 Jul 2026 14:16:44 -0700 Subject: [PATCH] docs(prompting): appendix cheat sheet + post-guide lint rules as prompt guidance --- docs/prompting/motion.mdx | 2 ++ docs/prompting/rules-and-anti-patterns.mdx | 33 ++++++++++++++++++++-- docs/prompting/runtimes-and-3d.mdx | 2 ++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/docs/prompting/motion.mdx b/docs/prompting/motion.mdx index 635d5f3ee..52c2304ec 100644 --- a/docs/prompting/motion.mdx +++ b/docs/prompting/motion.mdx @@ -33,4 +33,6 @@ Rule 1's ambient idle is *continuous* — a slow, smooth breathing scale. Rule 7 Name the seed and the hold length explicitly — "seeded" and "two-frame hold" are the two words that keep an agent from reaching for `Math.random()` and quietly breaking every re-render. Ask for it, and seeking to frame 214 twice gives you the identical frame twice, exactly like every other HyperFrames render — the imperfection is designed in, not left to chance. +Unseeded randomness is the obvious way to break cold-render correctness, but a handful of GSAP lint rules catch subtler seek-order mistakes — relative tweens colliding with another writer, `repeatRefresh` combined with a relative value, function-valued tween vars, DOM measurement inside timeline callbacks — see the [seek-order safety rows](/prompting/rules-and-anti-patterns#seek-order-safety) in the appendix if the linter ever flags one. + *Next: [Transitions](/prompting/transitions) — the same grammar applied to the cut between scenes, not just the motion inside one.* diff --git a/docs/prompting/rules-and-anti-patterns.mdx b/docs/prompting/rules-and-anti-patterns.mdx index 347dbe80a..7aa93606b 100644 --- a/docs/prompting/rules-and-anti-patterns.mdx +++ b/docs/prompting/rules-and-anti-patterns.mdx @@ -3,23 +3,50 @@ title: Rules and anti-patterns description: "The technical rules that keep renders correct, and the prompt patterns that cause friction." --- +Every rule below was taught somewhere earlier in this guide — nothing here is new material. This page is the lookup table: skim it when you're debugging a render or hand-editing a composition, and follow a rule's link back to the chapter that explains *why* it exists. The lint-rule rows extend the same seven rules with more specific cases the linter now catches automatically. + ## Rules to know The skills enforce these automatically, but if you hand-edit compositions or debug issues, these are the rules that matter: -1. **Register all timelines** on `window.__timelines` — the renderer can't seek animations it doesn't know about. +1. **Register all timelines** on `window.__timelines` — the renderer can't seek animations it doesn't know about. See the skeleton in [Anatomy of a one-shot prompt](/prompting/anatomy). 2. **Video elements must be `muted`** — audio goes in separate `