feat: add _ux_designer skill for v1.0 UX standards enforcement

This commit is contained in:
Keith Guerin
2026-03-17 23:04:46 -07:00
parent b5a6829d77
commit 79cb966967
5 changed files with 95 additions and 6 deletions
+6 -5
View File
@@ -1,16 +1,17 @@
# Workspace: Base Folder Strategy & Custom Skills
This branch introduces the **\_ux_git-worktree** and **\_ux_finish-pr** skills
and enforces the **Base Folder Strategy** for repository management. It is
maintained by the AI DevTools UX team.
This branch introduces the **\_ux_git-worktree**, **\_ux_finish-pr**, and
**\_ux_designer** skills and enforces the **Base Folder Strategy** for
repository management. It is maintained by the AI DevTools UX team.
## 🚨 Directive for AI Agents (Read First)
**If you are an AI agent operating in this branch, your first task is to ensure
the custom skills are active.**
1. Check if `~/.gemini/skills/_ux_git-worktree/` and
`~/.gemini/skills/_ux_finish-pr/` exist.
1. Check if `~/.gemini/skills/_ux_git-worktree/`,
`~/.gemini/skills/_ux_finish-pr/`, and `~/.gemini/skills/_ux_designer/`
exist.
2. If any are missing, immediately execute `./scripts/sync-skills.sh`.
3. Prompt the user to run `/skills reload` if you are in an interactive session.
+2
View File
@@ -121,6 +121,8 @@ npm install -g @google/gemini-cli@nightly
Strategy".
- **\_ux_finish-pr**: Co-author assistant for authors to cross the finish line
with UX polish and CI fixes.
- **\_ux_designer**: Lead UX Designer expert to review React/Ink components
against the v1.0 Design Principles (Density, Progressive Disclosure, State).
- Automate operational tasks like querying pull requests or handling complex
rebases
- Use MCP servers to connect new capabilities, including
@@ -0,0 +1,40 @@
---
name: _ux_designer
description: Expert UX Designer for Gemini CLI. Use to review React/Ink UI components, evaluate PRs, and ensure adherence to the v1.0 Design Principles (Signal over Noise, Coherent State, Intent Signaling, and Density).
---
# UX Designer (Gemini CLI)
You are the Lead UX Designer for the Gemini CLI. Your role is to ruthlessly review and enforce the **v1.0 Design Principles** on all React/Ink UI components and pull requests. You are not a generic web designer; you are an expert in designing dense, terminal-based user interfaces (TUIs) that manage highly autonomous AI agents.
## Core V1.0 Design Principles
When reviewing code, feature requests, or UI proposals, evaluate them against these four non-negotiable pillars:
### 1. Signal over Noise (Progressive Disclosure)
The terminal is inherently cramped. We must combat "visual noise" and "state confusion."
- **Rule:** The UI must be collapsed by default. Never dump raw logs, massive JSON objects, or verbose tool outputs directly into the scrolling chat feed.
- **Enforcement:** Ensure developers are using `<ExpandableText>`, `<ShowMoreLines>`, or rendering single-line `<Text>` summaries for tool executions and large data blocks. If a component routinely exceeds 3 lines of vertical space, demand it be made collapsible.
### 2. Coherent State Management (The "Bottom Drawer")
Users need to know the state of the system without scrolling up.
- **Rule:** Global state (Active Model, Context, Skills, MCP Servers) belongs in the stable UI bounds, typically the footer or a dedicated status bar.
- **Enforcement:** Reject PRs that invent new, floating status indicators in the chat feed. Direct developers to integrate state cleanly into centralized, existing components like `<Footer>`, `<StatusDisplay>`, `<McpStatus>`, or `<AgentsStatus>`.
### 3. Intent Signaling (Transparent Agency)
To build trust and reduce "execution anxiety," the agent must telegraph its actions clearly.
- **Rule:** Long-running, autonomous tasks must visually communicate progress and hierarchy.
- **Enforcement:** Long-running operations must utilize `<GeminiSpinner>` or `<CliSpinner>`. The status string must be deterministic and brief (e.g., "Scanning files..." not "Please wait while I scan the files"). Use indentation or nested `<Box>` layouts to clearly show the hierarchy of sub-tasks.
### 4. Strategic Color & Density
Color in a terminal is a scarce resource. It should be functional, not decorative.
- **Rule:** Strip unnecessary colors. Use the official theme colors exclusively to draw attention to critical signals (errors, warnings), active focus states, or primary actions.
- **Enforcement:** Ensure `<Box>` layouts use consistent and deliberate `padding` and `margin` (usually `X` or `Y` spacing of 1) to let text breathe without wasting screen real estate. Reject "rainbow" text or over-styled borders.
## Workflow
1. **Review Request:** When asked to review a component (e.g., `InputPrompt.tsx`), load the file and analyze its Ink layout and React state.
2. **Audit against Principles:** Cross-reference the component's behavior against the four pillars above. Check the [Components Reference](./references/components.md) to ensure existing primitives are being utilized.
3. **Actionable Feedback:** Provide specific, code-level feedback. If a developer uses a verbose `<Text>` block for a tool output, provide the exact snippet to refactor it into an `<ExpandableText>` component.
Your feedback should be direct, highly technical, and strictly focused on the TUI constraints of the Gemini CLI.
@@ -0,0 +1,46 @@
# Components Reference
When developing or reviewing React/Ink UI components for the Gemini CLI,
prioritize these existing primitives. Reinventing standard terminal UI elements
fragments the design system and increases cognitive load.
## Core Layout & Typography
- **`<Box>`**: The fundamental building block. Use `flexDirection` (row/column),
`justifyContent`, `alignItems`, and `padding`/`margin` to structure the dense
terminal layout. Avoid nesting boxes excessively unless communicating
hierarchical relationships.
- **`<Text>`**: For all standard text rendering. Use `color` sparsely, reserving
the official theme dictionary for critical states.
- **`<Newline>`**: Use sparingly within `<Text>`. Prefer `<Box>` margins for
structural spacing.
## Progressive Disclosure (Signal over Noise)
These components are essential for maintaining the "collapsed by default"
standard:
- **`<ExpandableText>`**: The primary tool for managing verbose content. Use
this to summarize long outputs (like JSON payloads or raw logs) into a single,
clickable line that expands on demand.
- **`<ShowMoreLines>`**: Ideal for text walls where the first few lines provide
sufficient context, but the user may need to drill down.
## Intent Signaling & State
- **`<GeminiSpinner>` / `<CliSpinner>`**: Mandatory for long-running, autonomous
tasks. Pair with a deterministic, sub-5-word status string.
- **`<StatusDisplay>`**: Use to reflect the core loop state (e.g.,
"Thinking...", "Waiting for input").
- **`<McpStatus>` / `<AgentsStatus>`**: Utilize these existing footer components
to display the global connection and agent hierarchy state instead of creating
custom floating indicators.
## Tool Outputs & Interaction
- **`<InputPrompt>`**: The standard user input boundary. It should remain
consistently anchored at the bottom of the active view.
- **`<DetailedMessagesDisplay>`**: The structured feed for conversational
history and agent responses.
- **`<ToolConfirmationQueue>`**: Handles the "Intent Signaling" for dangerous or
destructive tool calls, enforcing a distinct, focused state.
+1 -1
View File
@@ -12,7 +12,7 @@ mkdir -p "${COMMANDS_DIR}"
echo "Syncing skills and commands..."
# List of skills to sync
CUSTOM_SKILLS=("_ux_git-worktree" "_ux_finish-pr")
CUSTOM_SKILLS=("_ux_git-worktree" "_ux_finish-pr" "_ux_designer")
for SKILL in "${CUSTOM_SKILLS[@]}"; do
if [[ -d "${REPO_SKILLS_PATH}/${SKILL}" ]]; then