Skip to content

fix(skills): add rendering guardrails to hyperframes skill#217

Merged
miguel-heygen merged 1 commit intomainfrom
fix/skill-rendering-guardrails
Apr 7, 2026
Merged

fix(skills): add rendering guardrails to hyperframes skill#217
miguel-heygen merged 1 commit intomainfrom
fix/skill-rendering-guardrails

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

@miguel-heygen miguel-heygen commented Apr 7, 2026

Summary

Adds critical rendering constraints to the hyperframes skill discovered from eval analysis of 27 agent-generated compositions. These guardrails prevent agents from producing compositions that technically work but render poorly.

What it fixes

Rule Added Eval Prompts Affected Issue
Ban repeat: -1 #20 loading-spinner (2.0/5) Infinite timeline broke capture engine
Ban async timeline construction #16 particle-logo (2.6/5) Timeline empty at capture time
Min font size 16px (labels), 20px (body) #7, #8, #13, #14, #15, #19 Illegible text after encoding
Ban full-screen dark linear gradients #3, #5, #10, #14 H.264 color banding
<link> fonts over CSS @import #7, #24 Font loading race conditions

Changes

  • Rules section: Added repeat: -1 ban, async timeline ban, items 8-9 to "Never do" list
  • Typography section: Expanded font size guidance with specific minimums per text role (headlines, body, labels)
  • New "Backgrounds and Color" section: Guidance on avoiding gradient banding
  • Output Checklist: 5 new items covering all new constraints

Test plan

  • Run eval with updated skill and compare avg quality scores
  • Skill renders correctly in /hyperframes invocation

Adds critical constraints discovered from eval analysis of 27
agent-generated compositions:

- Ban `repeat: -1` (broke loading-spinner, prompt 20)
- Ban async timeline construction (broke particle-logo, prompt 16)
- Enforce minimum font sizes: 16px data labels, 20px body text
  (prompts 7, 8, 13, 14, 15, 19 all had illegible small text)
- Ban full-screen dark linear gradients (prompts 3, 5, 10, 14
  all showed H.264 color banding)
- Mandate `<link>` font loading over CSS `@import` (prompts 7,
  24 had font loading races)
- Updated output checklist with all new constraints

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@miguel-heygen miguel-heygen changed the base branch from fix/encoder-quality-crf to graphite-base/217 April 7, 2026 01:04
@miguel-heygen miguel-heygen force-pushed the fix/skill-rendering-guardrails branch from 33bfdcc to 8c5cec0 Compare April 7, 2026 01:04
@miguel-heygen miguel-heygen changed the base branch from graphite-base/217 to main April 7, 2026 01:04
@miguel-heygen miguel-heygen merged commit 883bd82 into main Apr 7, 2026
17 of 26 checks passed
miguel-heygen added a commit that referenced this pull request Apr 7, 2026
## Summary

Adds a new lint rule `gsap_infinite_repeat` that flags `repeat: -1` in GSAP timelines as an error. This is a hard enforcement of the skill guardrail added in PR #217.

## What it fixes

The deterministic capture engine (`HeadlessExperimental.beginFrame`) seeks to exact frame times on a paused GSAP timeline. When a timeline contains `repeat: -1`, the timeline duration is infinite, which causes the capture engine to produce incorrect/blurry output.

**Eval prompt #20** (loading-spinner, scored 2.0/5) used `repeat: -1` on a dots animation cycle, producing "a highly compressed and blurry loading animation lacking visual clarity and professional polish."

## Changes

- `packages/core/src/lint/rules/gsap.ts` — new `gsap_infinite_repeat` rule (regex scan for `repeat: -1`)
- `packages/core/src/lint/rules/gsap.test.ts` — 2 new tests (detects infinite repeat, allows finite repeat)

## Test plan

- [x] `pnpm --filter @hyperframes/core test` — all 429 tests pass
- [x] Rule catches `repeat: -1` and reports as error with fix hint
- [x] Rule does not flag `repeat: 4` (finite repeats)
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.

2 participants