Ui context and scope

From dembrandt/dembrandt-skills · View interactive version

Ui context and scope is an AI agent skill from the GitHub repository dembrandt/dembrandt-skills. Show where the user is and what their actions affect — breadcrumbs, regions, scope labels. Use when designing deep navigation or multi-section layouts.

How to use this skill

Skill file

UI Context and Scope

Users need to know three things at all times:

  1. Where am I? — current location in the product hierarchy
  2. What context am I in? — which section, record, or workspace is active
  3. What will my actions affect? — scope of changes before committing them

When these are unclear, users make mistakes, feel lost, and lose trust in the product.

Communicating Hierarchy with Visual Structure

Lines and Dividers

Horizontal rules and borders signal the boundary between sections. Use them to separate content areas that belong to different contexts — not just for decoration.

Colour Regions and Background Fills

Background colour is one of the strongest signals for "you are now in a different area."

Section Labels and Context Headers

Every major region should be able to answer "what am I?" without the user having to read surrounding content.

Navigating Depth

Breadcrumbs

Show breadcrumbs from the second level down; leave them off top-level pages, where they would only repeat the page title. Start from the page's parent in the navigation's own words. Do not prefix a generic home crumb that names nothing in the navigation.

Projects > Website Redesign > Tasks > #142 Fix header

Search and Filter as Navigation

In products with large or dynamic content trees, search reduces the cognitive cost of navigating depth.

Scope Communication Before Action

When a change, setting, or action affects a specific scope, that scope must be communicated before the user commits — not discovered afterward.

Hidden Scope Needs a Visible Indicator

When a setting decides which data the whole application shows (tenant, site, environment), the control may live in a settings dialog. The state may not. Put a persistent read-only indicator in the chrome. Rarely changed is an argument about the control, never about the state. Without the indicator every screen looks correct in the wrong dataset.

Switching scope discards everything derived from the previous scope: searches, staged rows, selections.

Acting on Behalf of Someone Else

Whenever the user is viewing or changing data as another user, customer, or account — impersonation, admin "view as", support acting on a customer's behalf — the interface must make that unmistakably obvious the entire time, not just at the moment they enter the mode.

The risk being designed against is an operator making a change believing they're in their own context when they're really in a customer's — scope confusion here causes real damage.

Authentication Is a Trust Context

The login / sign-up screen is where the user hands over a password — an inherently scary moment, and the point where they most need to feel they're in the right, safe place. Design it as a trust surface, not an afterthought:

Logged out mounts no shell. Render the login view at the root and nothing behind it. A shell behind a blur or a non-dismissable modal is masking, and masking is CSS: one class removed in devtools shows navigation, customer names and feature toggles to an anonymous visitor. Assert in a test that no shell element exists while logged out.

Data leaving the context. When a feature sends people or customer data to an external model, replace every identifying string with a stable pseudonym before the request and map the response back in the client. Keep pseudonyms consistent across rows so relationships survive. Once names leave, no vendor promise brings them back.

Distinguish Internal Tools from External Products

Internal / back-office software should carry a deliberate visual "quirk" — a distinct accent colour, an env badge, a marked header — that makes it impossible to mistake for the customer-facing app. This prevents an operator from confusing an internal admin surface with the external product (or a staging environment with production). The cue should be persistent and immediately legible, not hidden in a settings page.

Which Application, Whose Data, What Permissions

Where one login opens several tools, "where am I?" gains two answers the user needs at once, and both belong in the persistent shell rather than on a page ([[app-shell]]).

Which application. Once tools share a shell and a brand, they also start to look alike — a good outcome that creates a new failure: acting in the wrong tool. The application's own name stays visible in the shell, always in the same place.

Whose data. In a multi-tenant or multi-customer tool the active tenant is named permanently, and repeated in the confirmation of anything destructive. Name it as a label; do not encode it as a colour or theme, which breaks the brand and makes contrast unpredictable. Colour is reserved for the environment cue above, where confusing production with staging has a real cost.

What permissions. Internal users benefit from seeing the role they are operating under — it explains why an action is missing, and it makes an over-privileged session visible to the person holding it. Show the role in the shell, and prefer disabled-with-reason over silently hidden for actions the user's role blocks ([[nielsen-usability-heuristics]]). Customer-facing products should not surface roles this way; there, absence is the cleaner answer.

Review Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.