Skip to content

feat(cli): skipContrastInMotion moves to HF_TOOL_CONTEXT check-review - #6400

Merged
xuanruli merged 2 commits into
mainfrom
feat/check-review-capability
Oct 26, 2026
Merged

xuanruli merged 2 commits into
mainfrom
feat/check-review-capability

Conversation

@xuanruli

@xuanruli xuanruli commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

The switch from #6396 that leaves out contrast failures measured mid-animation moves from a CLI flag and an
environment variable to a field in HF_TOOL_CONTEXT:

{ "version": 1, "capabilities": { "check-review": { "skipContrastInMotion": true } } }
  • Removed: --skip-contrast-in-motion and HYPERFRAMES_CHECK_SKIP_CONTRAST_IN_MOTION.
  • Added: a check-review capability parsed by readToolContext(). Its only field for now is
    skipContrastInMotion. A value that is not true is off, and unknown fields are ignored.
  • The motion rule itself (contrastMotion.ts, the in-page read in checkBrowser.ts) is unchanged.

Without the capability, check output is byte-identical to today's.

Why

This switch is for harnesses that show check output to an agent, not for people at a terminal. As a flag it added
a row to hyperframes check --help, to the CLI docs and to the hyperframes-cli skill, so every terminal user and
every agent reading the skill saw an option meant for one kind of caller. HF_TOOL_CONTEXT is the documented
interface a harness already uses to tell the CLI what it can do (events, project-lock), so any harness can opt
in there and the CLI surface and skills stay as they were before #6396.

Related work

Follow-up to #6396 (merged as afdad4e). #6401, stacked on this one, adds a second check-review field, findingFrames.

How

Test plan

  • Unit tests updated: check.test.ts turns the switch on through HF_TOOL_CONTEXT instead of the flag;
    toolContext.test.ts covers parsing check-review fields as booleans that default to false.
  • vitest run src/commands/check.test.ts src/utils/toolContext.test.ts src/utils/contrastMotion.test.ts src/utils/checkBrowser.test.ts
    in packages/cli: 4 files, 210 tests passed.
  • tsc --noEmit in packages/cli: clean.
  • oxlint and oxfmt --check on the changed files: clean. gen:skills-manifest --check: in sync.
    scripts/lint-skills.ts and check-skill-mirror.mjs: no issues.
  • Documentation updated.
  • Comments follow CONTRIBUTING.md "Comments".

Not covered

The --skip-contrast-in-motion flag and HYPERFRAMES_CHECK_SKIP_CONTRAST_IN_MOTION
env give way to a check-review capability in HF_TOOL_CONTEXT, so only a harness
turns it on. The skill text and manifest go back to main.
@mintlify

mintlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Oct 26, 2026, 7:18 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 137 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 8153246

Scope
  • Parsing: parseCheckReview sets the switch only on strict === true. A non-object capability (including an array) is dropped, a missing field or a field that is not true (1, "1") is false, and unknown fields are ignored. Bad JSON or a wrong version still returns {}.
  • events/project-lock: the parsers and return spreads are unchanged. projectLock.ts still reads its own readToolContext(). Without check-review the returned object is the same as before, so the existing toEqual cases still hold.
  • Propagation: parseCheckOptions is the only producer of skipContrastInMotion. checkPipeline.ts:607 and checkBrowser consume it unchanged. A grep finds no remaining references to the flag or the env var.
  • Default output: with no capability the key is absent, the same as base with the flag off.
  • Compat: #6396 (afdad4ea3) is in no release tag (v0.8.201 predates it), so removing the flag and env var breaks no shipped interface. The skills/hyperframes-cli/ tree matches afdad4ea3~1, and the manifest hash is back to 08a4a3a815d71988.
  • CI: every workflow on this head passed, including required Typecheck, Test, Windows, Skills manifest and edit-accuracy gate.

@xuanruli
xuanruli added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 257bf28 Oct 26, 2026
72 checks passed
@xuanruli
xuanruli deleted the feat/check-review-capability branch October 26, 2026 07:58
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.

1 participant