Skip to main content
GeneralCodename-Inc

spectre-ux

πŸ‘» | Define user flows, components, and UX behavior β€” generates the UX spec for a feature - primary agent

Stars
142
Source
Codename-Inc/spectre
Updated
2026-05-28
Slug
Codename-Inc--spectre--spectre-ux
View on GitHubRaw SKILL.md

// install β€” copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/Codename-Inc/spectre/HEAD/plugins/spectre-codex/skills/spectre-ux/SKILL.md -o .claude/skills/spectre-ux.md

Drops the SKILL.md into .claude/skills/spectre-ux.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

ux

Transform product requirements into a definitive behavioral spec β€” clear on WHAT the user sees/does and how the system responds, silent on visual taste (trust the implementer for pixels). Two stages with a hard gate between them: (1) align on user flows, then (2) write the detailed ux.md.

Inputs

  • $ARGUMENTS β€” explicit feature name/root or descendant requirements artifact.
  • Requirements doc β€” first that exists, read FULLY (no offset/limit):
    1. {OUT_DIR}/concepts/scope.md (canonical, preferred)
    2. {OUT_DIR}/specs/prd.md
    3. {OUT_DIR}/task_summary.md
  • If none exist β†’ ask for scope context or recommend spectre-scope first; do not invent scope.

Working Set (late-bound β€” read at run-time, never inline)

  • Reuse a managed FEATURE_ROOT only when explicit/current-thread evidence ties it to this work (physical directory wins; never branch/recency/lifecycle/scans); distinct work ignores ambient roots. Otherwise, including on collision, standalone MUST first load and follow Skill(spectre-feature-root) through DONE; orchestrated calls escalate. Keep writes beneath it and pass it unchanged.
  • Repair stale feature/root metadata in artifacts this workflow touches.
  • OUT_DIR = FEATURE_ROOT.
  • Existing UI: one @spectre_patterns dispatch (Stage 1) for similar screens/components, conventions, design tokens β€” return ≀~2K in-thread, no files.

Method / guardrails

Stage 1 β€” Flow discovery & alignment (align before specifying).

  • Identify user segments β€” flows diverge across these and missing them is the #1 cause of UX rework: first-time vs returning, anon vs signed-in, free vs paid, role-based.
  • Identify journeys: user goals, entry points, completion states.
  • Write each flow as a narrative: Goal Β· Entry point Β· Steps (User sees β†’ User does β†’ System responds) Β· Decision points + branches Β· Success state Β· open Questions. Call out where flows diverge per segment.
  • Present flows, propose a specific take (N flows Γ— M segments + key segmentation calls), and ask for pushback. GATE: write no detailed spec until the user replies "Flows approved." On feedback β†’ revise and re-present.

Stage 2 β€” Detailed spec (only after the flow gate clears).

  • Review approved flows for gaps (component behaviors, edge cases, state defs, segment variants); if significant, ask 3–5 targeted questions via AskUserQuestion (empty states, errors, loading, limits, segment differences) β€” no clarification files.
  • Write {OUT_DIR}/ux.md with every required section + the domain specifics below.

Outputs + DONE

Write {FEATURE_ROOT}/ux.md with all 11 sections. Immediately below the title, ux.md records:

Feature: <feature-name>
Feature Root: .spectre/features/<feature-name>

Derive both values from the physical feature directory.

  1. Overview β€” what it is, problem solved, primary user goal (1 para)
  2. User Segments β€” each segment served + what's different about their UX
  3. Screens β€” every screen: name, 1-line purpose, navigation relationships
  4. Flows β€” formalized from Stage 1 with alternate paths (validation fail, cancel, network error) + per-segment branches
  5. Layouts β€” per screen: header/main/footer structure + responsive behavior (desktop >1024 Β· tablet 768–1024 Β· mobile <768)
  6. Components β€” each interactive element: purpose, location, applicable states (from the State Vocabulary)
  7. Interactions β€” table: Element | Action | Result (exhaustive)
  8. States β€” table: State | Trigger | Appearance | Available Actions
  9. Content β€” exact copy: page titles, buttons, empty states, error messages, confirmation dialogs
  10. Edge Cases β€” limits/boundaries, null/long data, permissions, offline/network failures, segment-specific
  11. Accessibility β€” tab order, keyboard actions (Enter/Space/Escape), screen-reader announcements, focus management

State Vocabulary β€” pick what's relevant per component (not every component needs every state):

  • Visual (per interactive element): default, hover, focus, active/pressed, disabled
  • Data (per data view): empty, loading, partial-loaded, loaded, error, stale/refreshing
  • Form: pristine, dirty, touched, submitting, submitted-success, submitted-error, per-field validation-error
  • Selection: none, single, multi, partial-selection, all-selected
  • Sync (collaborative/async): optimistic, pending, conflict, resolved
  • Network (where relevant): online, offline, reconnecting

DONE when: the Stage-1 flow gate was cleared (user approved flows); ux.md exists with all 11 sections; segments addressed; flows carry alternate paths; Interactions and States tables use the exact column formats above; component states are drawn from the State Vocabulary; layouts state the responsive breakpoints; accessibility and edge cases covered.

Handoff

Confirm completion inline (screens specified, segments addressed, flows documented, components+states, edge cases + a11y covered) with the doc path. Then choose one:

  1. Material visual/interaction assumptions remain, stakeholder visual review is needed, or prose alone cannot validate the experience β†’ spectre-prototype. Apply surfaced assumptions or contradictions back to ux.md before planning.
  2. Otherwise β†’ spectre-plan, the unified tier/research/review/task router.

Render Next (recommended): /spectre:{command} β€” because {observed UX signal}. Confirmed repository-changing work routes to spectre-plan; read-only UX review may stop or hand off without planning. Add at most one conditional alternative. If stopping, offer Pause: spectre-handoff {feature} with the completed UX path and selected next step.

Escalate-If

  • No scope/PRD/summary found β†’ stop; get scope context or route to spectre-scope before specifying.
  • User pushes for implementation/architecture decisions β†’ note them, defer to spectre-plan; keep this pass on behavior.
  • Flows won't converge after iterating β†’ surface the specific unresolved divergence (usually a segment conflict) and ask the user to decide before Stage 2.
  • Feature has no user-facing surface β†’ this spec adds nothing; route back to spectre-plan.