/groundwork:source-ux-design-from-codefrom groundwork
Keeps a design system document synchronized with codebase changes during development sessions. Handles monorepo project selection and model effort recommendations.
Ships in groundwork. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keeps {{specs_dir}}/design_system.md synchronized with design implementation decisions made during sessions.
Your current effort level is {{effort_level}}. Skip this step silently if effort is high, xhigh, or max (the scale is low < medium < high < xhigh < max, so xhigh and max are already above high) AND you are Sonnet or Opus. Otherwise ask via AskUserQuestion (header "Model check"; options "Continue anyway" / "Cancel — I'll switch first"):
"Do you want to switch? Design token and pattern change categorization benefits from consistent reasoning.
Recommended: Sonnet or Opus at high effort.
To switch: cancel, run
/effort high(and/model sonnetif on Haiku), then re-invoke this skill."
If the user selects "Cancel — I'll switch first": output the switching commands and stop. Do not proceed with the skill. Ask once per conversation: a skill invoked by another skill skips this step when the recommendation was already shown. In a non-interactive run (--noninteractive, GROUNDWORK_RUNNER_MODE=true, or GROUNDWORK_BATCH_MODE=true), skip the prompt and continue on the current model.
.groundwork.yml exist at the repo root?
{{project_name}} non-empty?
Skill(skill="groundwork:select-project") to select a project, then restart this skill.{{project_name}}, specs at {{specs_dir}}/.--project.
.groundwork.yml: the repo root or the selected project's path → fine, proceed; no project's path → proceed without warning (shared directory).--noninteractive, keep the selected project and continue; otherwise warn via AskUserQuestion:
"You're working from
<cwd>(inside [cwd-project]), but the selected Groundwork project is [selected-project] ([selected-project-path]/). What would you like to do?"
- "Switch to [cwd-project]"
- "Stay with [selected-project]" If the user switches, invoke
Skill(skill="groundwork:select-project").
{{specs_dir}}/design_system.md{{specs_dir}}/design_system/ (content split across files)Detection: Check for a single file first (it takes precedence), then a directory. Read a directory as all its .md files recursively — _index.md first, then numerically-prefixed files, then alphabetically.
Run this skill at the end of a session in which:
/groundwork:source-ux-design-from-codeReview the current session for:
Token Changes:
.tcss/themes, Lip Gloss styles, ratatui Style, Ink styles); border/glyph/key-hint vocabulary changedColor extensions/asset catalogs, Compose MaterialTheme, RN style tokens); text-style or safe-area usage changedComponent Styling:
UX Pattern Implementations:
Brand Identity:
| Category | Signal | Design System Section |
|---|---|---|
| Design principle | Explicit "we should always..." statement | §1.2 Design Principles |
| Accessibility | ARIA labels, contrast fixes, focus states | §1.1 Accessibility Requirements |
| Spacing token | New spacing value, padding/margin pattern | §1.3 Token Categories (Spacing) |
| Elevation token | Shadow values, z-index decisions | §1.3 Token Categories (Elevation) |
| Border radius | Corner radius decisions | §1.3 Token Categories (Border Radius) |
| Color token | New color value, palette adjustment | §2.1 Color System |
| Typography | Font family, size, weight decisions | §2.2 Typography |
| Brand voice | UI copy patterns, tone decisions | §2.4 Brand Voice |
| Visual atmosphere | Surface treatments, textures, spatial character, tonal direction | §2.5 Visual Atmosphere |
| Navigation | Nav structure, menu patterns | §3.1 Navigation |
| Loading states | Skeleton, spinner, progress patterns | §3.2 Loading States |
| Error handling | Error display, validation feedback | §3.3 Error Handling |
| Empty states | No-data, first-run experiences | §3.4 Empty States |
| Form patterns | Input validation, form layout | §3.5 Form Patterns |
| Responsive | Breakpoint decisions, mobile adaptations | §3.6 Responsive Behavior |
| Motion | Animation timing, transitions, entrance patterns, hover signatures | §3.7 Motion & Interaction Character |
| Component | New component styling guidelines | §4 Component Guidelines |
For each detected change, propose a specific update:
## Proposed Design System Updates
### 1. New Design Principle
**Trigger:** You established that all interactive elements should have visible focus states.
**Proposed addition to §1.2 Design Principles:**
### DP-00X: Accessible Focus States
**Status:** Accepted
**Date:** [today]
**Context:** Implementing keyboard navigation revealed need for consistent focus indicators.
**Decision:** All interactive elements must have visible focus states with 3:1 contrast ratio.
**Rationale:** Supports keyboard-only users and WCAG 2.1 AA compliance.
---
### 2. New Color Token
**Trigger:** You added a new warning color for form validation.
**Proposed addition to §2.1 Color System:**
| Token | Value | Usage |
|-------|-------|-------|
| `--color-warning-light` | #FEF3C7 | Warning background |
**Proposed addition to §5 Decision Log (Brand Decisions):**
### BRD-00X: Warning Color Variant
**Status:** Accepted
**Date:** [today]
**Context:** Form validation needed softer warning background.
**Decision:** Added `--color-warning-light` (#FEF3C7) for warning backgrounds.
**Rationale:** Maintains warning semantic while providing softer background option.
---
### 3. UX Pattern Implementation
**Trigger:** You implemented skeleton loading screens for data tables.
**Proposed addition to §3.2 Loading States:**
**Data Tables:** Use skeleton rows matching table structure. Show 5 skeleton rows by default. Animate with subtle pulse.
**Proposed addition to §5 Decision Log (UX Decisions):**
### UXD-00X: Table Loading Pattern
**Status:** Accepted
**Date:** [today]
**Context:** Data tables needed loading feedback during API calls.
**Decision:** Use skeleton rows (5 default) with pulse animation for table loading states.
**Rationale:** Maintains layout stability and sets user expectations for content shape.
---
Approve these updates? (yes/no/modify)
On approval:
{{specs_dir}}/design_system.md.md files from {{specs_dir}}/design_system/{{specs_dir}}/design_system.md directly{{specs_dir}}/design_system/01-foundations.md{{specs_dir}}/design_system/01-foundations.md{{specs_dir}}/design_system/01-foundations.md{{specs_dir}}/design_system/02-brand-identity.md{{specs_dir}}/design_system/02-brand-identity.md{{specs_dir}}/design_system/02-brand-identity.md{{specs_dir}}/design_system/03-ux-patterns.md{{specs_dir}}/design_system/04-components.md{{specs_dir}}/design_system/05-decisions.md{{specs_dir}}/ux-preview.html exists, regenerate it to reflect the updated design system decisions{{specs_dir}}/wireframes.html exists, regenerate it too — the wireframes composite the design system onto the app's screens and go stale on any token/pattern change (Step 8c of ux-design for the format; screens and flows come from the PRD, so only regenerate screens that still exist)Important:
Strong signals (likely design system change):
MaterialTheme/SwiftUI theme edits; Dynamic Type or dark-mode variant changesWeak signals (maybe design system change):
Focus on strong signals. For weak signals, ask: "Is this a pattern we want to establish, or a one-time implementation detail?"
When done, report:
## Design System Sync Summary
**Session Date:** [date]
### Changes Detected:
1. [Change 1] → New principle DP-00X
2. [Change 2] → New color token BRD-00X
3. [Change 3] → UX pattern UXD-00X
4. [Change 4] → No design system impact (implementation detail)
### Design System Document:
- [X] Updated with approved changes
- [ ] No changes needed
- [ ] Changes pending user review
### Decision IDs Added/Modified:
- DP-00X (new)
- BRD-00X (new)
- UXD-00X (new)
### Open Items:
- [Any unresolved design questions from session]
This skill works in concert with:
/groundwork:ux-design - For deliberate, interactive design system creation/groundwork:source-product-specs-from-code - PRD changes may affect design requirements/groundwork:source-architecture-from-code - Architecture changes may affect UX patternsWhen multiple sync commands run:
/groundwork:source-product-specs-from-code first (product drives design)/groundwork:source-ux-design-from-code second (design supports product)/groundwork:source-architecture-from-code last (architecture implements both)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (etr/groundwork) — no native marketplace selected
npx claudepluginhub p/etr-groundwork44 skills in this plugin
/build-unplannedBuild a feature from a description with worktree isolation and TDD. Optional flag - --on-unrelated-failure stop-and-ask|expand-and-fix|ignore-and-merge - how validation treats gate failures unrelated to the active project (default stop-and-ask)./check-specs-alignmentVerify alignment between code and specs./create-tasksGenerate implementation tasks from architecture document./debugUse when investigating bugs, unexpected behavior, test failures, or any code that does not work as expected - enforces systematic root cause analysis before any fixOther plugins' skills for the same job