surfaces
Installation
SKILL.md
If .ux-profile.md exists at the project root, read it before changing surfaces, forms, or focus behavior.
If the chosen surface is a page / route, read page-patterns and name the pattern before writing page markup.
Intent
Users lose context when the wrong surface type interrupts their flow. Quick edits stay in place; longer work gets a dedicated route; destructive actions never fire without explicit, named confirmation. This skill routes tasks to the lightest surface that still supports the work.
Hard Rules (Non-Negotiable)
- Task <10s: slide-over, drawer, or non-modal popover. Do not navigate away from the current page or replace the main view. The user must retain spatial context of where they started.
- Task ≥10s or multi-step: dedicated sub-page with its own URL route. Stacking modals is prohibited. A second modal on top of an open modal is a hard failure — promote to a route or collapse into one sequential flow on a page.
- Single-field edits (rename, title, one value): in-place only, with 0 layout shift. Display and edit share one reserved box — same width, height, and position. Stack the input on the label (CSS grid, one cell) or overlay it. Do not swap in a taller control, extra padding, or a new Save/Cancel row. Neighbors must not move: a sibling's
getBoundingClientRect().topand.leftbefore and after entering edit must match. Enter saves; Escape cancels. A modal or slide-over for one field is a hard failure. - All destructive operations: dedicated confirmation dialog that (a) names the exact entity, e.g. "Delete workspace 'Analytics'?" — never "Are you sure?"; (b) uses a destructive verb on the confirm button in destructive color; (c) sets Cancel as default keyboard focus; Escape dismisses without executing.
See reference/destructive-actions.md for confirmation layout, focus trapping, and copy templates.