UX Component Spec Skill
WorkflowSkills Project Context
Before acting, resolve project documentation roots:
- Look for a
[DOC]-*directory at project root. - If found, set
DOC_ROOTto that directory andUX_DOCS_ROOTto[DOC]-*/11-UX-DesignOps. - If
[DOC]-*is absent, stop and ask to initialize project documentation first; never write persistent UX documentation todocs/obsidian. - If UX docs do not exist inside
[DOC]-*, run or followux-bootstrap. - Read
DESIGN.md, existing components, tokens, Storybook if present, and related UX docs. - All persistent documentation must be in French and include YAML frontmatter.
Goal
Create a component contract before implementation or refactor.
Process
- Identify the component role, users, context, and parent flows.
- Define props or inputs at a behavioral level without inventing backend contracts.
- Define visual states, validation states, loading, disabled, selected, empty, and error variants.
- Define keyboard, focus, labels, ARIA needs, and motion constraints.
- Define responsive behavior and layout constraints.
- Map required tokens and existing components to reuse.
- Save the output under
UX_DOCS_ROOT/05-Components/.
Output
Create or update UX_DOCS_ROOT/05-Components/[component].md with frontmatter:
---
title: UX Component - ComponentName
type: ux-component
status: draft
created: YYYY-MM-DD
updated: YYYY-MM-DD
component: ComponentName
tags:
- ux
- component
---
Rules
- Do not code unless explicitly asked.
- Prefer existing components and tokens.
- If Storybook exists, include story coverage recommendations.
- Update
DOC_ROOT/00-MOC/MOC-UX.md.