Skip to content

docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d) - #1361

Merged
jayminwest merged 4 commits into
ui-visual/golden-approval-4780from
ui-visual/conventions-598d
Oct 9, 2026
Merged

jayminwest merged 4 commits into
ui-visual/golden-approval-4780from
ui-visual/conventions-598d

Conversation

@jayminwest

Copy link
Copy Markdown
Owner

Last step of plan pl-10db (seed warren-598d): write the UI rules down now that the gates that enforce them exist, so every rule points at a check.

Stack

#1356 (warren-4780, baseline approval label) → #1360 (warren-dbef, auto-merge requires ui-visual and design-review) → this PR.

The base is ui-visual/require-checks-dbef. Once #1356 and #1360 merge, retarget this PR to main. It carries no-automerge so these docs do not land on main before the gates they describe.

Summary

  • AGENTS.md: new "UI conventions" section (52 lines, after Naming conventions). A rule-to-check table covers tokens, the arbitrary-value ratchet (check:tailwind-arbitrary), primitives and the GritQL bans (.biome/plugins/), both viewports and both themes (check:ui-visual smoke and axe), empty/loading/error states, operator copy, and the page manifest. It also covers how to run bun run check:ui-visual --build locally (goldens are CI-only), the ui-baseline-approved label for __golden__ changes, and the required ui-visual and design-review checks.
  • Folded, not duplicated: the UI merge-gate paragraph that feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) #1360 added under "Protected paths (Article IX)" moved into the new section. The existing "UI bugs: reproduction first" section (warren-9fd7) moved, unchanged, to sit right after it, and the new section links to it. The two lint-guard bullets under Quality gates stay where they are.
  • .github/pull_request_template.md: a collapsed <details> "UI definition of done" checklist.
  • src/ui/README.md: a "Rendered checks and design review" section that links docs/design/ui-visual-gate.md and docs/design/ui-design-review.md.

Accuracy notes

The docs describe what is on this branch, not what the plan intended:

  • tokens.css has color, font, radius, shadow, and z-index tokens, but no type or spacing scale. warren-1682, warren-2662, and warren-c5a1 closed against the unmerged ui/polish-overhaul branch (UI polish overhaul: faster console, work-centric Home, ⌘K, event log, instance name + run time limit #1286). So the type and spacing rules point at the design-review rubric (type-scale, spacing-rhythm) and docs/ui-revamp/README.md. The arbitrary-value rule tells agents to add a named token when no scale utility fits.
  • components/ui has Button and Input but no Select, Textarea, or Card (warren-92c4 has the same problem). The raw-element allowlist is not empty yet (warren-3eac).

Validation

  • bun run check:agents passes. Every bun run <x> and backticked path resolves.
  • Prose guard: AGENTS.md stays at its 92 budget, and src/ui/README.md at 17. The new prose adds zero violations.
  • bun run lint green. Full check:all ran through the pre-commit hook.

…and reports a design-review check (warren-a694) (#1359)

.github/workflows/ui-design-review.yml runs the ui-design-review skill
through claude-code-action (pinned by commit) after each ui-visual run,
validates the verdict with scripts/design-review/verdict.ts, and reports
the result as the `design-review` check run on the PR head plus one sticky
comment keyed by <!-- design-review -->.

- gate (pull_request_target): every PR head into main gets the check at
  once, success "Skipped: no src/ui changes" or queued, so the check
  warren-dbef makes required never hangs.
- prepare (workflow_run): trusts the artifact's PR number only when that
  PR's head is the run's head sha, maps changed files to manifest pages,
  stages only in-scope screenshots and the src/ui diff.
- evaluate: contents: read token, scoped tools, no web tools, fixed
  prompt with no PR text, model/turn/budget caps from repo variables.
- report: re-validates in a fresh checkout and fails closed on a missing
  or invalid verdict.

Logic lives in pure, unit-tested modules under scripts/design-review/.
…e (warren-598d)

Adds a UI conventions section to AGENTS.md that pairs each rule with the
check that holds it: the Tailwind arbitrary-value ratchet, the GritQL
primitive and inline-style bans, check:ui-visual, the golden baseline
approval label, and the design-review rubric. Folds the UI merge-gate
paragraph out of Protected paths into it and moves the repro-first
section next to it. The PR template gains a collapsed UI definition of
done, and src/ui/README.md links both UI design records.
@jayminwest jayminwest added the no-automerge Human-gated PR: auto-merge workflow must never enable auto-merge label Oct 8, 2026
Base automatically changed from ui-visual/require-checks-dbef to ui-visual/golden-approval-4780 October 8, 2026 23:30
@jayminwest
jayminwest merged commit 38e3d39 into ui-visual/golden-approval-4780 Oct 9, 2026
5 checks passed
@jayminwest
jayminwest deleted the ui-visual/conventions-598d branch October 9, 2026 14:51
jayminwest added a commit that referenced this pull request Oct 9, 2026
…o-merge refuses without it (warren-4780) (#1356)

* feat(ui-visual): human-only approval for golden baseline changes; auto-merge refuses without it (warren-4780)

auto-merge.yml gains a UI baseline approval check next to Article IX. A PR
that changes scripts/ui-visual/__golden__/ or the comparison machinery arms
only when a human approver applied ui-baseline-approved to the exact baseline
content the head carries. The gate reads the labeler from the issue events
API (never label presence), the head the approver saw from the repository
activity API, and compares baseline object ids. It runs the base branch's
copy of scripts/ui-visual/baseline-approval.ts, fails closed, and disarms on
refusal. The arm step now also refuses to arm a head the gates did not judge.

Adds the label, CODEOWNERS routing, and docs/design/ui-visual-gate.md.

* feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) (#1360)

* docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d) (#1361)

* feat(ui-visual): design-review workflow runs the evaluator on UI PRs and reports a design-review check (warren-a694) (#1359)

.github/workflows/ui-design-review.yml runs the ui-design-review skill
through claude-code-action (pinned by commit) after each ui-visual run,
validates the verdict with scripts/design-review/verdict.ts, and reports
the result as the `design-review` check run on the PR head plus one sticky
comment keyed by <!-- design-review -->.

- gate (pull_request_target): every PR head into main gets the check at
  once, success "Skipped: no src/ui changes" or queued, so the check
  warren-dbef makes required never hangs.
- prepare (workflow_run): trusts the artifact's PR number only when that
  PR's head is the run's head sha, maps changed files to manifest pages,
  stages only in-scope screenshots and the src/ui diff.
- evaluate: contents: read token, scoped tools, no web tools, fixed
  prompt with no PR text, model/turn/budget caps from repo variables.
- report: re-validates in a fresh checkout and fails closed on a missing
  or invalid verdict.

Logic lives in pure, unit-tested modules under scripts/design-review/.

* feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef)

* docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d)

Adds a UI conventions section to AGENTS.md that pairs each rule with the
check that holds it: the Tailwind arbitrary-value ratchet, the GritQL
primitive and inline-style bans, check:ui-visual, the golden baseline
approval label, and the design-review rubric. Folds the UI merge-gate
paragraph out of Protected paths into it and moves the repro-first
section next to it. The PR template gains a collapsed UI definition of
done, and src/ui/README.md links both UI design records.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-automerge Human-gated PR: auto-merge workflow must never enable auto-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant