Skip to content

chore: one CI check holds the one-way-per-concept rules, and the check lines become yui-check - #2182

Merged
yw0nam merged 5 commits into
mainfrom
chore/2142-concept-rules
Nov 30, 2026
Merged

yw0nam merged 5 commits into
mainfrom
chore/2142-concept-rules

Conversation

@yw0nam

@yw0nam yw0nam commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Summary

The first of the four #2142 follow-ups, and the check that keeps each of them done.

scripts/ci/concept-rules.mjs + concept-rules.json   one check for one-way-per-concept rules
  rule = { id, concept, owner (file:symbol with a concept-owner marker, or a library), patterns (regex, paths, exclude), baseline [{file, text, count}], reason }
  fails on: owner gone · a match beyond its baseline · a baseline entry matching fewer times (shrink-only)
            · vs the base ref: a rule added/removed/changed or a baseline entry grown   (label rule-change)
            · vs the base ref: a changed file still holding baseline entries             (label refactor-later + a "Refactor later:" line)
  runs: test-guard job on PRs (labels and body from one API call) · web job on pushes to main · pnpm gates against origin/main

src/ui/quick-controls/sections/check-line/check-line.css   owns the key/server check lines
  yui-start__checking|dot|err|err-text|err-help|fade, @keyframes yui-start-fade|yui-start-pulse  →  yui-check__*, yui-check-fade, yui-check-pulse
  rule "check-line": the legacy names nowhere in src/ or mocks/, and no yui-check selector or keyframes outside the owner sheet

Why these choices:

  • Baseline entries carry file, text and count, not line numbers: edits elsewhere in a file do not churn them, and a second identical occurrence is not hidden.
  • A base without concept-rules.json counts as an empty list, so this first PR passes with the rule-change label; an invalid ref, unreadable JSON or a non-list is fatal.
  • The Voice step's own yui-voice-step__checking is folded into yui-check__checking (its rules were paired one to one with the Quick start ones in key-entry.css), a departure from spec item 7's "page selectors stay": owner decision 3 gives the check lines one look under one name, and the parity run below shows no change. The Voice error line keeps its extra yui-voice-step__err.
  • Owner and marker names match whole names (.ow does not satisfy .own, check-line not check-line-2); the PR body's Refactor later: line is read with CR stripped.

Related issues

Part of #2142

Related decisions / docs

  • Owner decisions on Wayfinder: one way per concept — consistency rules, refactored on touch #2142 (latest comment, 2026-11-30): one small PR per item; the first builds the check; the check lines become yui-check.
  • Pointers only in AGENTS.md and CONTRIBUTING.md; one row in docs/agent-guide/harness-enforcement.md; docs/agent-guide/project-structure.md gains check-line/; the PR template gains a commented Refactor later: field.
  • Labels: rule-change (description now names concept rules too) and the new refactor-later.

Runtime evidence (required for UI / DOM / runtime behavior)

Before/after pixel parity on the settings window (headless Chrome, browser build of main c528d4c vs this branch), states whose styles moved: OpenClaw token row checking, refused and unreachable; Hermes key row waiting, slow and refused; free-key paste checking and refused; Voice step checking and refused; connected state done (fade) and rejected — at 1160×680 and 880×640, Dawn and Hearth, plus 1160 Dawn with reduced motion.

  • 60 pairs, 0 differing pixels; 485 check-line element records, 0 computed-style differences.
  • Dot pulse yui-start-pulse 1.2s infinite → yui-check-pulse 1.2s infinite; .is-still and reduced motion none before and after; .yui-check__fade yui-start-fade 0.14s → yui-check-fade 0.14s; reduced-motion .yui-start__rise yui-start-fade 0.2s → yui-check-fade 0.2s.
  • The three mocks (card-drop.html, quick-start-agents.html, settings-stage.html) load with no failed requests and styled check lines.
  • Driver and output: .handoffs/any-subagent-logs/2026-11-30-2142-parity/.

The CI wiring (test-guard step, label and body read) runs on this PR for the first time.

Merge danger

  • Door: two-way (a revert removes the check and restores the class names).
  • Blast radius: every PR now runs the concept-rules step in test-guard; the settings window's check lines.

Verification

  • pnpm build passes (includes tsc typecheck)
  • pnpm test passes
  • pnpm lint passes (biome format + lint)
  • cargo test / cargo clippy pass (Rust changes) — ran because ci.yml changed
  • Runtime evidence attached above, or N/A justified

pnpm gates once at f6edf81f with CONCEPT_RULES_CHANGE_OK=1 (this PR adds the first rule): 19 of 19 exit 0. Red runs: 9adc155f 15 red (+10 it.each rows red), ee73bea3 2 red (+1 row red).

Checklist (YUI principles)

  • Schema changes update docs/reference/client-context.md alongside the code (none)
  • docs/agent-guide/architecture/map.js carries every module, part, and exchange this PR adds, removes, or changes (none: a sheet inside the quick-controls part)
  • No unverified assumptions (the Actions step is unverified until this PR's run)
  • No brain in the client
  • No inline control tags
  • No hardcoding
  • New/changed behavior ships a test in this PR

@yw0nam yw0nam added the rule-change A PR that deliberately changes a rule test (rule-tests.sh) or a concept rule (concept-rules.json) label Nov 30, 2026
@yw0nam
yw0nam merged commit 38134e3 into main Nov 30, 2026
12 checks passed
@yw0nam
yw0nam deleted the chore/2142-concept-rules branch November 30, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rule-change A PR that deliberately changes a rule test (rule-tests.sh) or a concept rule (concept-rules.json)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant