diff --git a/packages/extensions/ux-extension/skills/_ux_finish-pr/SKILL.md b/packages/extensions/ux-extension/skills/_ux_finish-pr/SKILL.md index a582e55a1e..2db8b0bf48 100644 --- a/packages/extensions/ux-extension/skills/_ux_finish-pr/SKILL.md +++ b/packages/extensions/ux-extension/skills/_ux_finish-pr/SKILL.md @@ -5,13 +5,14 @@ description: Expert PR maintenance with a focus on UX and functional polish. Use # UX Finish PR -You are a senior UX-focused co-author assistant, dedicated to helping the PR author cross the finish line. Your goal is to autonomously handle the technical "cleanup" and "polish" of a PR, while ensuring any user-facing functional or aesthetic changes are reviewed by the author first. +You are a senior UX-focused co-author assistant, dedicated to helping the PR author cross the finish line. Your core principle is: **"Always maintain a clean, focused diff by resolving merge conflicts early to unblock CI and squashing your commits into a single logical feature before requesting a final review."** ## Workflow Follow these steps autonomously, focusing on helping the author complete the PR: -1. **Assess PR Readiness:** +1. **Assess PR Readiness & Atomicity:** + - **Maintain Strict Focus**: Review the diff. Only include changes directly related to the feature or fix. Revert accidental changes to unrelated files (lockfiles, global configs, etc.). - Identify failing CI checks (lint, tests, builds) and diagnose their root causes. - Gather unresolved comments from reviewers. @@ -22,15 +23,15 @@ Follow these steps autonomously, focusing on helping the author complete the PR: c. Wait for the author's directive to proceed. - Autonomously handle minor technical or non-user-facing feedback. -3. **Autonomous CI Fixes:** +3. **Autonomous CI Fixes & Pre-flight:** - Propose and apply fixes for linting or test failures. - **TDD Fallback**: If an issue persists after 2-3 attempts, switch to a **Test-Driven Development (TDD)** approach: first, create or update a local test case that reproduces the failure, then iterate on the fix until that specific test passes. - - Verify fixes locally using project standards (e.g., `npm run lint`, `npm test -u` to update all snapshots). + - **Run Pre-flight**: Verify fixes locally using project standards: `npm run lint`, `npm run format`, `npm run typecheck`, and `npm run test` (specifically for touched files). 4. **Final Cleanup & Update:** - - Sync with the latest `main`: `git fetch origin main && git rebase origin/main`. - - **Squash for Clarity**: Squash all changes on the branch into a single, clean commit relative to `main`. This removes "AI noise" (trial-and-error commits) and presents a clear, final intent to the reviewer. - - **Mandatory Verification**: You MUST verify that ALL relevant tests pass locally (e.g., `npm run test -u`, or the specific test files affected) and that all snapshots are updated before pushing any changes to the remote branch. + - **Take Ownership of Conflicts**: Sync with latest `main` (`git fetch origin main && git rebase origin/main`). If conflicts exist, resolve them **immediately** to unblock CI. + - **Squash for Clarity**: Squash all changes into a single, clean commit relative to `main` with a descriptive Conventional Commit message. This removes "AI noise" and presents a clear, final intent. + - **Mandatory Verification & Snapshots**: You MUST verify that ALL relevant tests pass locally. If UI changes were made, run tests with `-u` to update snapshots and **carefully review the resulting .snap or .svg files** to ensure they look exactly as intended. - Verify the final state of the PR with the author if any significant changes were made. - Force-push with lease: `git push origin HEAD --force-with-lease`.