state-sweep
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseState Sweep
State Sweep
Find behavior the happy-path design is hiding.
发现常规路径设计中隐藏的行为。
Always
基本原则
- Context — inspect what is already known before asking the user to repeat it. Use when product purpose or outcome can change the answer, and load only the additional project context the task needs.
.ux/INTENT.md - User — ground the work in the people affected, their goal, task, context, and available evidence. Do not invent user needs, behaviors, or personas.
- Evidence — keep known, inferred, assumed, unknown, and conflicted information distinct when the difference matters.
- System — prefer established product language, components, patterns, and rules before inventing new ones.
- Clear — lead with the useful point, use the minimum structure needed, and remove generic AI filler.
- Trust — never invent evidence, requirements, rationale, implementation status, or compliance.
- Outcome — for substantial multi-step work, keep intent active, use a small only when continuity needs it, prioritize the highest-impact unresolved gap before polishing, and verify the actual experience against intent before declaring completion.
.ux/STATE.md
Do not recite these rules to the user unless one of them materially affects the answer.
Do not introduce research questions, personas, or discovery work when the user and task are already clear or the missing information would not materially change the work.
- 上下文 —— 在要求用户重复信息之前,先查看已知内容。当产品目标或结果会影响答案时,使用,仅加载任务所需的额外项目上下文。
.ux/INTENT.md - 用户 —— 基于受影响用户的目标、任务、上下文和现有证据开展工作。不得凭空捏造用户需求、行为或角色。
- 证据 —— 当差异很重要时,明确区分已知、推断、假设、未知和存在冲突的信息。
- 系统 —— 优先使用已确立的产品语言、组件、模式和规则,而非创造新的内容。
- 清晰性 —— 先呈现有用信息,使用最少必要的结构,删除通用AI生成的冗余内容。
- 可信度 —— 不得捏造证据、需求、理由、实施状态或合规性相关内容。
- 成果导向 —— 对于复杂的多步骤工作,保持目标明确;仅当需要保持连续性时使用小型;在优化细节前优先处理影响最大的未解决缺口;在宣布完成前,验证实际体验是否符合预期目标。
.ux/STATE.md
除非这些规则对答案有实质性影响,否则不要向用户复述这些规则。
当用户和任务已经明确,或缺失的信息不会对工作产生实质性影响时,不要引入研究问题、用户角色或探索性工作。
Read the flow and system
梳理流程与系统
Inspect the current design or implementation, the smallest relevant project context, relevant API or data behavior when available, design-system states, accessibility rules, and existing product patterns.
检查当前设计或实现、最小相关项目上下文、可用的相关API或数据行为、设计系统状态、无障碍规则以及现有产品模式。
Sweep by transition, not checklist
按过渡场景梳理,而非按清单排查
For each meaningful user action or system transition, ask what the user sees and can do:
- before data is available;
- while work is happening;
- when nothing exists;
- when only part succeeds;
- when input is invalid;
- when permission or eligibility blocks progress;
- when data changes or becomes stale;
- when the network, service, or dependency fails;
- when a session or operation times out;
- when the user interrupts, leaves, retries, or resumes;
- after success, including confirmation and persistence.
Also check focus, announcements, keyboard behavior, and recovery where dynamic state changes affect accessibility.
针对每个有意义的用户操作或系统过渡,询问用户会看到什么以及可以做什么:
- 数据可用之前;
- 处理进行中;
- 无内容时;
- 仅部分操作成功时;
- 输入无效时;
- 权限或资格限制阻碍进度时;
- 数据变更或过期时;
- 网络、服务或依赖项故障时;
- 会话或操作超时时;
- 用户中断、离开、重试或恢复操作时;
- 成功之后,包括确认和状态持久化。
同时检查焦点、提示信息、键盘操作行为,以及动态状态变更影响无障碍性的恢复机制。
Avoid state inflation
避免状态冗余
Do not create a separate visual state when the existing system behavior already handles the condition adequately. Reuse documented component states when possible.
当现有系统行为已能充分处理某种情况时,不要创建单独的视觉状态。尽可能复用已记录的组件状态。
Output
输出结果
Produce a concise state map. For each missing state, include the trigger, expected user-visible behavior, recovery path, and whether the design system already supports it.
Prioritize states whose absence can strand a user, lose work, create incorrect confidence, or produce inconsistent implementation.
生成简洁的状态映射表。对于每个缺失的状态,需包含触发条件、预期的用户可见行为、恢复路径,以及设计系统是否已支持该状态。
优先处理那些缺失后可能导致用户受阻、丢失工作内容、产生错误认知或导致实现不一致的状态。
Contrast example
对比示例
Bad:
Consider loading, empty, error, success, offline, permission, timeout, disabled, hover, focus, validation, and edge-case states.
Good:
After the user submits payment, the request can remain pending while the service responds. The current design leaves Submit available during that transition, so a second submission is possible. Add a pending state that prevents duplicate submission, preserves the entered data, communicates progress, and defines what happens if the request times out.
Why: the good response starts from a real transition and consequence instead of generating a generic state inventory.
反面示例:
考虑loading、empty、error、success、offline、permission、timeout、disabled、hover、focus、validation以及边缘场景状态。
正面示例:
用户提交付款后,请求可能在服务响应期间处于待处理状态。当前设计在该过渡期间仍保留“提交”按钮可用,可能导致重复提交。需添加待处理状态,防止重复提交,保留已输入的数据,传达处理进度,并定义请求超时后的处理逻辑。
原因:正面示例从真实的过渡场景和后果出发,而非生成通用的状态清单。
Examples
使用示例
- "What states am I missing?"
- "State-sweep this checkout flow."
- "Engineering asked what happens when the API times out."
- “我遗漏了哪些状态?”
- “对这个结账流程进行State Sweep梳理。”
- “开发人员询问API超时后的处理逻辑。”