ai-sdlc-ux

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ai-sdlc-ux: Traceable Experience Specification

ai-sdlc-ux:可追溯的体验规范

Optional domain skill, not required by the core module. Every rule below is important to follow. None of it can be skipped. UX artifacts specify behavior; they do not imply stakeholder approval or visual fidelity.
可选领域Skill,核心模块无需依赖。 以下所有规则均需严格遵守,不得跳过任何一条。 UX工件用于定义行为,不代表相关方已批准也不涉及视觉保真度。

0. Skill Card

0. Skill卡片

  • Skill name:
    ai-sdlc-ux
  • Primary audience: UX, BA, PM
  • Supporting audience: Dev, QA, Accessibility, Delivery
  • Audience tags: UX, BA, PM, Dev, QA
  • SDLC stage: Discovery, refinement, and design
  • Purpose: Preserve testable journeys, states, recovery, and accessibility.
  • Output:
    ux-spec.md
    and
    _ai_sdlc/ux-spec.toon
  • Skill名称:
    ai-sdlc-ux
  • 核心受众: UX、BA、PM
  • 辅助受众: 开发、QA、无障碍、交付
  • 受众标签: UX、BA、PM、Dev、QA
  • SDLC阶段: 发现、细化与设计
  • 用途: 保留可测试的旅程、状态、恢复流程及无障碍要求。
  • 输出:
    ux-spec.md
    _ai_sdlc/ux-spec.toon

0.1 Required Inputs

0.1 必填输入

  • Owning feature root.
  • UX input using
    ai-sdlc-ux-input/v1
    .
  • Actors and requirement or acceptance trace targets.
  • 所属特性根目录。
  • 使用
    ai-sdlc-ux-input/v1
    格式的UX输入。
  • 角色以及需求或验收追溯目标。

0.2 Clarification Rules

0.2 澄清规则

  • Ask when actor, goal, permission, channel, or success outcome is ambiguous.
  • Separate user need from interface solution and visual preference.
  • Include non-happy states and recovery behavior, not only a golden path.
  • Do not infer accessibility conformance or user research evidence.
  • 当角色、目标、权限、渠道或成功结果不明确时,需主动询问。
  • 将用户需求与界面方案、视觉偏好区分开。
  • 需覆盖非理想状态及恢复行为,不能仅考虑最优路径。
  • 不得推断无障碍合规性或用户研究证据。

0.2.1 Flow Mode Flags

0.2.1 流程模式标记

  • Support
    --quick-flow
    and
    --full-flow
    ; full flow takes precedence.
  • Quick flow permits one traced actor journey with explicit gaps.
  • Full flow requires at least one journey, interaction state, and accessibility check.
  • Both modes require exact trace targets and actor consistency.
  • 支持
    --quick-flow
    --full-flow
    ;全流程模式优先级更高。
  • 快速流程模式允许单个带明确缺口的可追溯角色旅程。
  • 全流程模式要求至少包含一个旅程、交互状态及无障碍检查。
  • 两种模式均要求精确的追溯目标和角色一致性。

0.3 Output Rules

0.3 输出规则

  • Return actors, journey/state coverage, accessibility status, blockers, and output paths directly in the Codex response.
  • Before the final response, emit
    ai-sdlc-handoff/v1
    with
    result
    ,
    blockers
    ,
    next_required
    , and
    next_optional
    ; every action includes
    reason
    ,
    command
    , and
    expected_artifact
    .
  • Do not create
    summary.txt
    ,
    *-summary.txt
    , or untraced mockup prose.
  • Keep behavior testable and avoid presenting assumptions as research.
  • 在Codex响应中直接返回角色、旅程/状态覆盖范围、无障碍状态、阻塞点及输出路径。
  • 在最终响应前,发送包含
    result
    blockers
    next_required
    next_optional
    ai-sdlc-handoff/v1
    ;每个操作需包含
    reason
    command
    expected_artifact
  • 不得创建
    summary.txt
    *-summary.txt
    或无追溯性的原型描述文本。
  • 确保行为可测试,避免将假设当作研究成果呈现。

0.4 Artifact Routing

0.4 工件路由

  • Write
    <feature-root>/ux-spec.md
    .
  • Write
    <feature-root>/_ai_sdlc/ux-spec.toon
    .
  • Use the owning workspace selected by the feature; implementation UX supports SDD.
  • Keep generated image/design files separate and link them as evidence when present.
  • 写入
    <feature-root>/ux-spec.md
  • 写入
    <feature-root>/_ai_sdlc/ux-spec.toon
  • 使用特性选定的所属工作区;实现层UX支持SDD。
  • 单独存放生成的图片/设计文件,存在时将其作为证据链接。

0.5 Feature State Machine

0.5 特性状态机

  • Read
    <feature-root>/_ai_sdlc/state.toon
    before durable work.
  • UX is an optional capability and does not add a core lifecycle stage.
  • --state-check
    is read-only;
    --begin-state
    and
    --complete-state
    are rejected.
  • Route accepted behavior changes through owning requirements and change-impact workflows.
  • 在进行持久化工作前,读取
    <feature-root>/_ai_sdlc/state.toon
  • UX是可选能力,不会添加核心生命周期阶段。
  • --state-check
    为只读模式;
    --begin-state
    --complete-state
    将被拒绝。
  • 通过所属需求和变更影响工作流传递已接受的行为变更。

0.6 Artifact Metadata And Metatags

0.6 工件元数据与元标签

  • Markdown starts with
    artifact_metadata
    using schema
    ai-sdlc-ux-metadata/v1
    .
  • Include
    metatags
    for
    ai-sdlc
    ,
    ux
    ,
    experience
    , and
    traceable
    .
  • Record feature, workspace, flow mode, state file, trace IDs, and review status.
  • Markdown文件开头需使用
    artifact_metadata
    ,遵循
    ai-sdlc-ux-metadata/v1
    schema。
  • 包含
    ai-sdlc
    ux
    experience
    traceable
    的元标签。
  • 记录特性、工作区、流程模式、状态文件、追溯ID及评审状态。

0.7 Specs Index

0.7 规范索引

  • Read the relevant
    specs/_ai_sdlc/specs-index.toon
    or
    specs-refiniment/_ai_sdlc/specs-index.toon
    before broad reads.
  • Refresh the matching
    specs/specs-index.md
    or
    specs-refiniment/specs-index.md
    only after durable writes.
  • Keep one UX artifact in the owning feature boundary.
  • 在进行大范围读取前,先读取相关的
    specs/_ai_sdlc/specs-index.toon
    specs-refiniment/_ai_sdlc/specs-index.toon
  • 仅在完成持久化写入后,刷新对应的
    specs/specs-index.md
    specs-refiniment/specs-index.md
  • 在所属特性边界内仅保留一个UX工件。

References

参考资料

  • Read
    references/ux-contract.md
    for actor, journey, state, and accessibility fields.
  • Use
    scripts/ux.py
    to validate and route the canonical artifact pair.
  • 阅读
    references/ux-contract.md
    获取角色、旅程、状态及无障碍字段定义。
  • 使用
    scripts/ux.py
    验证并路由标准工件对。

Script Usage

脚本使用

bash
python3 skills/ai-sdlc-ux/scripts/ux.py specs-refiniment/onboarding --input /tmp/ux.json --emit --quick-flow
python3 skills/ai-sdlc-ux/scripts/ux.py specs/onboarding --input /tmp/ux.json --write --full-flow --format toon
bash
python3 skills/ai-sdlc-ux/scripts/ux.py specs-refiniment/onboarding --input /tmp/ux.json --emit --quick-flow
python3 skills/ai-sdlc-ux/scripts/ux.py specs/onboarding --input /tmp/ux.json --write --full-flow --format toon

Purpose

用途

Add explicit experience behavior where it creates value without forcing visual design work into every delivery path or reducing UX to generic acceptance prose.
在能创造价值的场景中添加明确的体验行为,避免将视觉设计工作强制纳入每个交付路径,同时避免将UX简化为通用验收文本。

Inputs

输入要求

  • Define stable actor IDs, goals, and needs.
  • Trace every journey, state, and accessibility check.
  • Make steps ordered and acceptance outcomes observable.
  • Cover recovery from failure and blocked user states.
  • 定义稳定的角色ID、目标及需求。
  • 对每个旅程、状态及无障碍检查进行追溯。
  • 确保步骤有序且验收结果可观测。
  • 覆盖故障恢复及用户被阻塞状态的处理。

Steps

步骤

  1. Read customer/problem evidence, requirements, actors, and constraints.
  2. Define actors and their goals without inventing research claims.
  3. Map end-to-end journeys with ordered steps and acceptance outcomes.
  4. Specify loading, empty, error, permission, success, and recovery states.
  5. Define accessibility requirements and evidence status.
  6. Finalize routed Markdown and TOON outputs.
  7. Route behavior changes to BA/SDD and test cases.
  1. 读取客户/问题证据、需求、角色及约束条件。
  2. 定义角色及其目标,不得编造研究结论。
  3. 映射端到端旅程,包含有序步骤及验收结果。
  4. 指定加载、空态、错误、权限、成功及恢复状态。
  5. 定义无障碍需求及证据状态。
  6. 最终确定已路由的Markdown和TOON输出。
  7. 将行为变更传递给BA/SDD及测试用例。

Output Spec

输出规范

ai-sdlc-ux/v1
contains context, actors, journeys, interaction states, accessibility checks, content notes, and exact trace targets.
Quality gate:
  • Pass when journey actors exist, steps and acceptance are observable, states include behavior plus recovery, and accessibility status has evidence.
  • Full flow fails without journey, state, or accessibility coverage.
ai-sdlc-ux/v1
包含上下文、角色、旅程、交互状态、无障碍检查、内容说明及精确的追溯目标。
质量门:
  • 当旅程角色存在、步骤及验收可观测、状态包含行为及恢复流程、且无障碍状态有证据时,视为通过。
  • 全流程模式若缺少旅程、状态或无障碍覆盖,视为失败。

Examples

示例

A valid journey identifies actor
ACT-001
, ordered steps,
AC-012
traces, and observable completion. “Make onboarding delightful” is invalid because it has no actor, behavior, evidence, or testable outcome.
有效的旅程需明确角色
ACT-001
、有序步骤、
AC-012
追溯项及可观测的完成标志。“让入职流程愉悦”属于无效表述,因为它没有明确角色、行为、证据或可测试的结果。

Edge Cases

边缘情况

  • One actor may have several journeys with different permissions or channels.
  • A state may intentionally have no recovery; document the reason explicitly.
  • Accessibility checks may be planned, passed, failed, or blocked.
  • Visual references remain optional evidence and never replace behavior contracts.
  • 单个角色可能拥有多个不同权限或渠道的旅程。
  • 某些状态可能故意不设置恢复流程;需明确记录原因。
  • 无障碍检查状态可能为计划中、已通过、未通过或阻塞。
  • 视觉参考仅作为可选证据,绝不能替代行为契约。

Scope Boundary

范围边界

  • Do not claim user validation without research evidence.
  • Do not generate production UI code unless separately requested through SDD.
  • Do not replace business rules, requirements, or test cases.
  • Do not mark accessibility conformance from intent alone.
  • Use
    $ai-sdlc-change-impact
    when accepted UX behavior invalidates downstream work.
  • 无研究证据时,不得声称已完成用户验证。
  • 除非通过SDD单独请求,否则不得生成生产级UI代码。
  • 不得替代业务规则、需求或测试用例。
  • 仅靠意图不得标记无障碍合规。
  • 当已接受的UX行为导致下游工作失效时,使用
    $ai-sdlc-change-impact