Skip to content

Add UI finish gate rule#337

Open
samuelbushi wants to merge 2 commits into
PatrickJS:mainfrom
samuelbushi:agent/add-ui-finish-gate-rule
Open

Add UI finish gate rule#337
samuelbushi wants to merge 2 commits into
PatrickJS:mainfrom
samuelbushi:agent/add-ui-finish-gate-rule

Conversation

@samuelbushi

@samuelbushi samuelbushi commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Adds a framework-agnostic Cursor Project Rule that makes UI work evidence-driven and blocks completion until product specificity, required states, responsive behavior, interactions, and accessibility have been verified.

Contribution Type

  • New Cursor rule file or rules folder
  • Update/fix to an existing rule
  • New rules/*.mdc rule
  • Documentation or README cleanup

Value To Cursor Users

The rule provides a complete manual workflow rather than a product listing: inspect the existing product, build a reference brief, write a design contract, implement non-happy-path states, test the rendered interface, and rerun a blocking finish gate until every failure is fixed.

It is framework-agnostic and scoped to common web UI and Swift files. It explicitly rejects invented metrics, placeholder identities, decorative defaults, inert controls, and happy-path-only implementations.

Added Or Changed Files

  • rules/ui-finish-gate.mdc — the reusable reference-to-design-contract-to-finish-gate workflow.
  • README.md — registers the local rule under CSS and Styling using the repository's canonical self-link format.

Quality Checklist

  • The contribution includes original rule content, or clearly credits the source.
  • New rule files use a descriptive kebab-case filename, such as react-typescript.mdc.
  • New rules/*.mdc files include frontmatter with a non-empty description, relevant globs, and alwaysApply: false unless the rule is universal.
  • README links use canonical GitHub URLs for repo files and point to the correct category.
  • The text is neutral and useful, not sales copy.
  • This is not a standalone external tool, product, directory, marketplace, or service listing.
  • No secrets, tokens, affiliate links, tracking links, or unrelated product claims are included.
  • I checked for duplicate or near-duplicate existing entries.

Notes For Maintainers

The workflow is adapted from the UIZZE anti-UI-slop process; I maintain UIZZE. The rule is complete and useful on its own. https://uizze.com appears once as an optional public reference source, with an explicit untrusted-content guard, and is not required to use the rule.

Near-duplicate check: the existing Toss rule and open StyleSeed PR #315 define visual/design-system choices. This rule instead governs the end-to-end decision and verification process: product inspection, evidence extraction, a design contract, state matrix, rendered checks, and a blocking finish gate.

Validation:

  • npm test — 84/84 passing
  • npm run check:awesome-list
  • npm run check:repo-hygiene
  • npm run check:prompt-safety
  • pnpm dlx awesome-lint@2.3.0 using the upstream repository context
  • git diff --check

Summary by CodeRabbit

  • Documentation
    • Added a new “UI Finish Gate” rule to the rules catalog.
    • Documented a structured workflow for creating or materially changing user-facing interfaces, including reference evidence, design contracts, and required UI states.
    • Added a completion checklist that requires blockers to be fixed and the gate rerun when any check fails, with coverage across device sizes and interaction/accessibility scenarios.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 50f9791f-6c3b-40d0-8592-3cc357ee5a04

📥 Commits

Reviewing files that changed from the base of the PR and between 56c12f5 and c03424d.

📒 Files selected for processing (1)
  • rules/ui-finish-gate.mdc
🚧 Files skipped from review as they are similar to previous changes (1)
  • rules/ui-finish-gate.mdc

📝 Walkthrough

Walkthrough

Adds a Cursor rule for UI completion, covering design evidence, implementation constraints, required states, responsive and accessibility checks, and blocker handling. The README rules catalog links to the new rule.

Changes

UI Finish Gate

Layer / File(s) Summary
Document and catalog the UI Finish Gate
rules/ui-finish-gate.mdc, README.md
Defines the UI inspection, design contract, implementation, state coverage, rendered testing, and completion checklist, then adds the rule to the README catalog.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: patrickjs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding the UI finish gate rule.
Description check ✅ Passed The PR description matches the template well and includes summary, type, value, files, checklist, and maintainer notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rules/ui-finish-gate.mdc`:
- Around line 42-45: Update the state matrix and rendered-state verification
checklist in the UI finish gate so they cover the same required states. Add
disabled to both the matrix and rendered verification steps, and add partial to
the rendered verification checklist while preserving its existing matrix entry.
Ensure loading, empty, partial, error, success, disabled, and permission-limited
coverage remains consistent across both sections.
- Around line 3-4: Update the frontmatter glob in the UI finish-gate rule to
include js and ts alongside the existing UI file extensions, ensuring the rule
also applies to plain JavaScript and TypeScript UI screens while preserving all
current extensions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6a100c28-adda-4460-a002-44f498f0f724

📥 Commits

Reviewing files that changed from the base of the PR and between b044f95 and 56c12f5.

📒 Files selected for processing (2)
  • README.md
  • rules/ui-finish-gate.mdc

Comment thread rules/ui-finish-gate.mdc Outdated
Comment thread rules/ui-finish-gate.mdc Outdated
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