Skip to content

fix: graceful degradation for motion-heavy sites (closes #39)#56

Open
YAMRAJ13y wants to merge 1 commit into
JCodesMore:masterfrom
YAMRAJ13y:fix/issue-39-motion-heavy-graceful-degradation
Open

fix: graceful degradation for motion-heavy sites (closes #39)#56
YAMRAJ13y wants to merge 1 commit into
JCodesMore:masterfrom
YAMRAJ13y:fix/issue-39-motion-heavy-graceful-degradation

Conversation

@YAMRAJ13y

Copy link
Copy Markdown

Problem (closes #39)

网页的动态效果太多的话,他就完全失效了。
(When a webpage has too many dynamic effects, the clone completely fails.)

The root cause is in the clone-website skill itself: it treats every dynamic behavior as mandatory to reproduce ("you must catch those too", "extract every state"). On an effect-saturated site — WebGL/canvas scenes, chained GSAP timelines, dozens of staggered entrance animations — the agent tries to rebuild all of them in one pass. That introduces runtime errors and layout thrash, the build breaks, and the user is left with nothing. There was no triage, no priority order, and no fallback path.

Fix: static-first, degrade gracefully

This adds a graceful-degradation model so a heavy site produces a shippable static-but-accurate clone instead of a broken build:

  1. Guiding Principle 10 — "Graceful Degradation Beats Total Failure." Build a pixel-accurate static skeleton that compiles first (zero animation), then layer motion back in priority order, verifying the build after each addition. Effects that can't be faithfully rebuilt get a looping-video/screenshot fallback. Anything deferred is recorded, never silently dropped. Includes a per-section motion budget rule.

  2. "Motion Complexity Triage" reconnaissance step. Detect the animation stack (Framer Motion, GSAP/ScrollTrigger, Lenis/Locomotive, Three.js/WebGL/canvas, Lottie, particle systems, video backgrounds) via a per-technique fallback-strategy table, then classify the page as light / moderate / heavy and pick the matching strategy (static-first becomes mandatory for heavy).

  3. Two new "What NOT to Do" guardrails (don't chase animations until the build breaks; don't reimplement WebGL/canvas/complex GSAP from scratch — use fallbacks) and a motion-tier line in the completion report.

Implementation notes

  • Edited the source of truth .claude/skills/clone-website/SKILL.md and regenerated all 9 platform command files with node scripts/sync-skills.mjs (per AGENTS.md).
  • Docs/prompt-only change — no source code touched, so lint / typecheck / build are unaffected.

🤖 Generated with Claude Code

Effect-saturated sites (WebGL/canvas, chained GSAP timelines, dozens of
staggered animations) previously made the clone "completely fail": the
skill treats every dynamic behavior as mandatory to reproduce, so the
agent chases all of them, the build breaks, and the user is left with
nothing.

This adds a static-first / graceful-degradation model to the clone-website
skill:

- Guiding Principle 10 "Graceful Degradation Beats Total Failure": build a
  pixel-accurate static skeleton that compiles first, then layer motion
  back in priority order; use video/screenshot fallbacks for effects that
  can't be faithfully rebuilt; record anything deferred. Adds a per-section
  motion budget rule.
- "Motion Complexity Triage" recon step: detect the animation stack
  (Framer Motion, GSAP/ScrollTrigger, Lenis, Three.js/WebGL/canvas, Lottie,
  particle systems, video backgrounds) with a per-technique fallback
  strategy table, and classify the page as light/moderate/heavy.
- Two "What NOT to Do" guardrails and a motion-tier line in the completion
  report.

Edited the source skill (.claude/skills/clone-website/SKILL.md) and
regenerated all 9 platform command files via scripts/sync-skills.mjs.
Docs-only change; lint/typecheck/build unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

[Feature]: 网页的动态效果太多的话,他就完全失效了。

1 participant