Skip to content

refactor(user-interface): check durations from keys, fix layers, file follow-up #14318

Description

@kyle-sexton

Parent

Refs #14214
Source: PLAN Phases 9 to 11, topic literal-measurements-config

Depends on

Outcome

The write-css linter checks durations against the resolved key, the documented layers match the cascade, a review rule covers new inline values, and the follow-up for other plugins is filed.

Demo: review.mjs flags a transition over the caller's large duration, setup offers no --user write, the README shows four layers, and the follow-up ticket exists.

Problem: Most user-interface measurements are stated inline, so a team cannot change them through config and agents treat them as fixed unless the project has its own token.

  • Who / how many: teams and repositories using the user-interface plugin; count unknown.
  • Frequency, trend, cost: unknown.
  • Evidence: 32 reference and skill files hold about 198 lines with px values, and about 252 more lines hold other units, from rough greps (observed); agents treating inline values as fixed (inferred); the owner's no-hardcoding rule (reported).

Goal: A team changes any user-interface taste measurement through one config key, every floor and constant stays stated, and a downstream repository's conventions win.

  • Intent (why, in the user's words): "Everything should be configurable and extensible. We should never be hardcoding specific font sizes or ranges or any specific measurements and approaches."
  • Vision (where this heads): Everything is configurable, one source of truth.
  • When goals conflict, prefer: alignment over throughput

Constraints:

  • Production quality bar.
  • Everything configurable and extensible, with good defaults; approaches are met per rule.
  • Uniform and consistent, DRY, one source of truth, across the repository, plugins and skills; SOLID; highest accuracy and coverage.
  • Fact-based and fact-validated.
  • A downstream repository's conventions win over every layer: its design system, conventions, lint config and layer system.
  • Mechanism details are settled at planning.
  • Nothing is added to CI unless it is 100 percent needed; any CI addition comes to the owner first.
  • Provenance only in upstream records and changelog fragments.
  • Quality requirement: Maintainability: each value has one home and a named key, with the named copies in AC6.
  • Quality requirement: Reliability: an invalid setting follows the cascade rule: a valid higher layer still wins, an invalid personal value leaves the team value, otherwise the default applies.
  • Quality requirement: Usability: a reference stays readable once it names a key, and accessibility floors stay stated.
  • Quality requirement: Observability: the resolver shows each value and its layer.
  • Quality requirement: Scalability: new values join an existing role key where one fits.
  • Quality requirement: Performance: not applicable.
  • Quality requirement: Security: not applicable; scripts receive schema-validated numbers.
  • Run location: this work runs from the owner's local checkout. The classification scan, one-time named-key check and any proof runner stay uncommitted there, so an autonomous lane cannot run its checks.

Load-bearing assumptions

Assumption Source Falsifying check Response if false
The README's fifth user-global layer is out of date Brief At this item's entry the README layer table still names the layer Minor: drop the edit if already corrected

Decisions

  • Plan D3: Phases 9 to 11 ship as one pull request (owner confirmed at the breakdown).
  • Plan D4: review.mjs reports a transition longer than animation.duration_ms.large; the agent still judges each finding against its role. A modal between 300 and 500ms becomes a finding; a 400ms page-level transition is moved to Suppressed by the existing role step.
  • Plan Q6: A duration key is both the value a recipe writes and the role's ceiling.
  • Plan Q8: Two cases may join the existing review test.
  • Handoff D9: The vendored check is left unchanged, with durations checked in review.mjs.
  • Handoff D10: Setup drops apply --user.
  • Owner Q8 (a), 2026-11-09: Phase 10 adds one small setup eval case tagging setup. The changed-skills gate (plugins/skill-quality/scripts/check-skill.sh) fails any edit to the setup skill until a case tags it. AC15's "no new test" covers the feature, not a case an existing gate requires (PLAN Phase 10).
  • Plan Phase 9: hover moves out of medium into its own role, with the existing animation.duration_ms.hover key (reference/defaults.yaml).
  • Plan Phase 10, carried from Phase 2: setup's apply nests dotted keys per reference/values.md "Setting a key", and with no node it shows the shipped defaults.yaml values before stopping.
  • Interview Q29: No other plugin is edited; explore's list becomes a follow-up ticket that decides each pointer and the not-installed case.

Key interfaces

From the plan's Variation verdicts: vendored check-css.mjs: contain now, with review.mjs as the seam, because the file is hash-pinned; its duration rule is off and durations are checked there from resolved keys.

review.mjs main: disabledRules and lint are unchanged, with lint's duration findings dropped; new durationCeiling uses resolved animation.duration_ms.large, else the shipped default; new checkDurations reads transition properties in CSS and HTML style blocks and keeps path and line. css.rules.disable still suppresses the rule. A YAML reader load failure still exits 2.

The review rule is one line in the skills-and-agents review rules: a new taste number in a user-interface reference names a key, and a key name follows the shape rules in the plugin's values reference.

Conventions followed: ADR 0075; config-cascade contract.

Done when

  • AC11: Scripts use what the caller passes: write-css callers send animation.duration_ms with the rule ids.
  • AC15: No new test or CI check is added beyond the two approved review-test cases; a review rule covers new inline taste values and key names.
  • AC16: The one-time named-key check exits 0 on the finished tree.
  • AC17: The README's layer table matches the cascade source, and the setup skill no longer offers a write to the user-global file the cascade does not read.
  • AC18: Explore's list of plugins that repeat a user-interface craft value is filed as a follow-up ticket, each hit judged individually, or an existing matching ticket is updated; its URL is in the pull request.
  • AC19: The build starts only after feat(user-interface): default two-axis touch elements to tap-to-activate #14213 closes.
  • The review test passes, including a caller's lower ceiling reporting a duration the shipped default allows, in CSS and in an HTML <style> block.
  • git hash-object on the vendored check-css.mjs prints 6fa72714ba18cf02f698fa8015f63df043b3af85.
  • The write-css review reference names duration_ms, and the write-css skill no longer says "fixed limits".
  • Any eval case whose name starts with setup passes, or none exists.
  • The pull request adds a changelog fragment.

Out of scope

  • Editing other plugins; the follow-up ticket decides those.
  • Changing the vendored check-css.mjs.
  • All t3dotgg/tstack work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-human

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions