refactor: split repo into docs/ mockup/ app/
- move static mockups from resource/ui to mockup/ - move React app scaffold from resource/ui to app/ - move prome.md + images to docs/ - drop empty resource/jsonfile and resource/ - add root .gitignore - rewrite README for new layout - fix paths in mockup/index.html (resource/ui -> mockup, docs/prome.md)
This commit is contained in:
1 parent
8e87e47017
commit
92a2adad6a
133 files changed
+23416
-50
No files matched your search
@@ -0,0 +1,109 @@
|
||||
---
|
||||
name: frontend-design
|
||||
description: >-
|
||||
Product-specific interface design for an Agent-Native app. Use when creating
|
||||
or changing any user-facing UI, including screenshot feedback, copy or
|
||||
density cleanup, settings, controls, or a visual redesign.
|
||||
scope: both
|
||||
---
|
||||
|
||||
# Frontend Design
|
||||
|
||||
Design around the user's task and the app's existing visual language. A
|
||||
distinctive interface comes from a clear product point of view, not extra
|
||||
decoration. Keep implementation accessible and responsive.
|
||||
|
||||
## Choose a direction
|
||||
|
||||
Before a substantial new surface or redesign, decide who is using it, what
|
||||
they came to do, and what they should see or do next. Pick a visual direction
|
||||
that fits the product's brand and domain. For routine changes, inspect and
|
||||
follow the existing components, type, color tokens, and spacing.
|
||||
|
||||
If a screen has two unrelated primary jobs, split the workflows or states.
|
||||
Do not solve an unclear structure by adding more cards, tabs, controls, or
|
||||
explanatory copy.
|
||||
|
||||
## Keep the starting view focused
|
||||
|
||||
The first view should show where the user is, the current work or state, and
|
||||
the input or decision needed now. Make one action clear. Defer rare, advanced,
|
||||
diagnostic, destructive, and historical controls to a relevant menu or
|
||||
disclosure.
|
||||
|
||||
Every visible element should orient the user, show useful content or state,
|
||||
collect required input, or enable the next action. If it has no job, remove it
|
||||
or disclose it. Density should come from useful data, not extra chrome.
|
||||
|
||||
Do not add a page title that repeats the selected navigation item, a subtitle
|
||||
or eyebrow under a title, a count strip over visible content, an About section
|
||||
in settings, or helper copy that repeats a label unless the user asks for it.
|
||||
A card, panel, tab, or settings group gets a title or a description, not both.
|
||||
Use tooltips or progressive disclosure for explanations that are not needed to
|
||||
make the current decision. User-authored descriptions are content: render them
|
||||
when present and render nothing when empty.
|
||||
|
||||
For sequential setup, show one decision at a time with clear progress and
|
||||
sensible defaults. Use the smallest surface that fits the task: an inline row
|
||||
or dialog for a small edit, a focused flow for multi-step work.
|
||||
|
||||
## Use the app's design system
|
||||
|
||||
This starter ships **no brand system** — the neutral, 0%-saturation tokens in
|
||||
`app/global.css` are a placeholder, not a design to preserve. Every app must
|
||||
look impressive on first load even when the build prompt gives no design
|
||||
direction: commit to one deliberate visual world, set a product-fitting accent
|
||||
family in the light and dark tokens, and establish a clear type hierarchy,
|
||||
spacing rhythm, and one signature detail. Do not ship the gray placeholder and
|
||||
do not average toward generic SaaS. If an app already has a real brand, preserve
|
||||
it. Keep shared behavior and semantic token names consistent; palette, density,
|
||||
composition, type contrast, and shape language are yours to define. Prefer
|
||||
semantic color tokens over raw palette colors, and avoid generic gradients,
|
||||
glass effects, decorative blobs, and hero sections without a product purpose.
|
||||
|
||||
Use the app's local UI adapter for standard controls. In an Agent-Native app,
|
||||
check the configured design system and toolkit provider before changing how
|
||||
shared controls look. Read `shadcn-ui` when implementing or composing a
|
||||
standard control; keep product-specific layout and visual decisions here.
|
||||
|
||||
Use real or generated imagery when it helps the user understand the subject.
|
||||
Do not add decorative assets solely to fill empty space.
|
||||
|
||||
## Coordinate the UI with the agent
|
||||
|
||||
Keep repeatable, direct manipulation in the domain UI and use the agent for
|
||||
work that benefits from judgment, exploration, or conversation. If the app has
|
||||
a contextual agent sidebar, reuse it for in-context help and keep the user on
|
||||
the current work surface. Do not add a second freeform prompt box. A control
|
||||
that promises agent help should hand off the relevant context; label local,
|
||||
deterministic behavior plainly.
|
||||
|
||||
## Interaction Responsiveness
|
||||
|
||||
Show feedback as soon as the user acts, aiming for 100 ms. When work cannot
|
||||
finish immediately, acknowledge it before a network round-trip and show a
|
||||
focused pending state within 400 ms. Use optimistic updates when safe, then
|
||||
confirm or roll back on failure. Keep long work visibly progressing and offer
|
||||
a way to stop when the operation supports cancellation.
|
||||
|
||||
## Make interactions clear and accessible
|
||||
|
||||
Support keyboard use, visible focus, accessible names, readable contrast, and
|
||||
clear validation and recovery. Dialog and menu controls should use the app's
|
||||
existing accessible primitives rather than hand-built click-outside behavior.
|
||||
Never use browser `alert`, `confirm`, or `prompt` dialogs.
|
||||
|
||||
Use motion to clarify a state change. Prefer short transitions on opacity or
|
||||
transform, respect reduced-motion preferences, and avoid delaying content with
|
||||
decorative entrances or long animations.
|
||||
|
||||
Fit the content to narrow screens as well as desktop. Text and controls should
|
||||
not overflow their containers; fixed-format editors, boards, and toolbars
|
||||
should keep stable dimensions.
|
||||
|
||||
## Review the result
|
||||
|
||||
Check that the main job and next action are obvious. Look at the default,
|
||||
loading, empty, error, and success states that apply, and check a narrow
|
||||
viewport. Remove anything that competes with the task without helping the user
|
||||
act or understand state.
|
||||
@@ -0,0 +1,102 @@
|
||||
# Visual Direction Reference
|
||||
|
||||
Use this reference when a new app or workspace needs a visual point of view and
|
||||
does not already have an established brand system. It adapts the useful parts
|
||||
of Impeccable's workflow: understand the product, name the surface mode, deal
|
||||
several coherent directions, commit to one, and audit the result for defaults
|
||||
that became the design by accident.
|
||||
|
||||
## The direction contract
|
||||
|
||||
Before writing UI, capture these decisions in the app's `DESIGN.md`:
|
||||
|
||||
| Decision | What to record |
|
||||
| -------------------- | ----------------------------------------------------------------- |
|
||||
| Product mode | `operate`, `read`, `persuade`, or `experience` |
|
||||
| Audience and cadence | Who uses it, how often, and under what conditions |
|
||||
| Visual world | A short name and the feeling it creates |
|
||||
| Palette family | The semantic accent family and neutral undertone |
|
||||
| Type treatment | Sans-first, editorial contrast, or display-led emphasis |
|
||||
| Composition | Focused workbench, list/detail, document, canvas, or guided steps |
|
||||
| Shape language | Quiet corners, crisp geometry, or soft utility surfaces |
|
||||
| Anti-references | Defaults this app must not drift toward |
|
||||
|
||||
`DESIGN.md` is a portable design contract, not a license to bypass the app's
|
||||
tokens or component system. If the app already has a brand system, document it
|
||||
and preserve it. If it does not, choose a direction before styling.
|
||||
|
||||
## Palette families
|
||||
|
||||
Use one family as an accent and keep the rest of the system semantic and quiet.
|
||||
These are starting points, not a fixed theme library:
|
||||
|
||||
| Family | Good fit | Typical character |
|
||||
| ---------------- | ------------------------------------------- | --------------------------------- |
|
||||
| Ink / graphite | Admin, security, sensitive review | Serious, low-noise, high contrast |
|
||||
| Cobalt / sky | Planning, collaboration, scheduling | Clear, trustworthy, alert |
|
||||
| Pine / teal | Automation, systems, finance, data | Calm, capable, grounded |
|
||||
| Indigo / violet | Slides, creative tools, research | Exploratory, focused, expressive |
|
||||
| Plum / berry | Publishing, knowledge, editorial work | Distinctive, thoughtful, human |
|
||||
| Coral / rose | Communication, people, customer workflows | Warm, direct, social |
|
||||
| Ochre / citron | Lightweight planning or energetic utilities | Optimistic, sparing, directional |
|
||||
| Paper / charcoal | Long-form reading, exports, approvals | Tactile, restrained, legible |
|
||||
|
||||
Do not make warm beige plus terracotta the universal fallback. Do not rotate
|
||||
through saturated colors mechanically. Choose the family that supports the
|
||||
workflow, then verify contrast, dark mode, focus states, destructive states,
|
||||
and the sidebar boundary.
|
||||
|
||||
## Variation without chaos
|
||||
|
||||
Vary at least two independent axes when sibling apps share a workspace:
|
||||
|
||||
- accent family or neutral undertone;
|
||||
- information density and page composition;
|
||||
- type contrast and display treatment;
|
||||
- radius and border language;
|
||||
- navigation emphasis and use of whitespace.
|
||||
|
||||
Keep shared behavior, semantic token names, accessibility, and AgentSidebar
|
||||
placement consistent. The goal is a family of products, not five unrelated
|
||||
themes and not five copies of the same starter.
|
||||
|
||||
For a batch of apps, keep a small direction ledger in the workspace
|
||||
`DESIGN.md` or the handoff. Record each app's mode, direction, and palette
|
||||
family, then choose a new family or a clearly different composition for the
|
||||
next app unless an existing brand requires reuse. Never copy a sibling's
|
||||
`global.css` palette block or treat the last app's accent as the generator
|
||||
default.
|
||||
|
||||
## Review vocabulary
|
||||
|
||||
Make one named intervention at a time so the agent can reason about the
|
||||
change:
|
||||
|
||||
- `distill` - remove copy, controls, cards, and chrome that do not serve the
|
||||
next decision;
|
||||
- `typeset` - repair hierarchy, measure, line length, and emphasis;
|
||||
- `colorize` - establish a restrained semantic palette and contrast states;
|
||||
- `layout` - repair grouping, density, alignment, and responsive composition;
|
||||
- `polish` - resolve the small visual inconsistencies after the structure is
|
||||
right;
|
||||
- `audit` - check slop, accessibility, responsive behavior, and visual drift.
|
||||
|
||||
Do not average several directions into a generic compromise. Deal two or three
|
||||
coherent options only when a new or explicitly redesigned surface has a real
|
||||
visual decision to make; for routine operate work, select one fitting direction
|
||||
and encode only the useful decision in tokens and `DESIGN.md`.
|
||||
|
||||
## Anti-slop audit
|
||||
|
||||
Before handoff, inspect the first viewport and ask:
|
||||
|
||||
- Did the app inherit the neighboring app's palette or hero layout without a
|
||||
product reason?
|
||||
- Does the first viewport show one job and one next action, rather than a
|
||||
capability catalog?
|
||||
- Are there equal-weight cards, status chips, helper paragraphs, or controls
|
||||
that should be removed or disclosed?
|
||||
- Does the typography fit the product mode instead of decorating the shell?
|
||||
- Is the AgentSidebar distinct but quiet, with the domain page still primary?
|
||||
- Are focus, loading, empty, error, dark, and narrow-width states part of the
|
||||
same design direction?
|
||||
Reference in new issue
Block a user