---
name: ux_flow_spec.aiconfig
description: 试玩广告 UX 流程规范 - 定义 Loading → Tutorial → Gameplay → CTA 的完整用户流程
triggers: UX 流程,ux flow,用户体验,user experience,教程,tutorial,引导,onboarding,试玩流程,playable flow
---

# ux_flow_spec.aiconfig

试玩广告 UX 流程规范。定义从 Loading → Tutorial → Gameplay → CTA 的完整用户流程，包括每个阶段的时长预算、转场方式、交互模式。

### 流程概览

```
Loading (≤3s) → Tutorial (≤8s) → Gameplay (≤30s) → Endcard/CTA
   fade          guided-tap       free-play         cta-button
```

**核心原则：**
- 首次交互必须在 3 秒内发生（`firstInteractionWithin`）
- 教程阶段使用引导式点击（`guided-tap`），5 秒后可跳过
- Gameplay 阶段是核心体验区，关卡数与难度曲线联动
- Endcard 阶段展示 CTA，无时长限制

## Recipe

- **配置方式**：参数化（parametric）
- **核心参数**：
  - `totalDuration`: `45` — 预期总时长（秒）
  - `phases`: 四阶段配置数组
    - `loading`: 最长 3 秒，fade 转场
    - `tutorial`: 最长 8 秒，引导式点击，5 秒后可跳过
    - `gameplay`: 最长 30 秒，3 个关卡
    - `endcard`: 无时长限制，展示 CTA
  - `firstInteractionWithin`: `3` — 首次交互必须在几秒内
  - `ctaVisibility`: `"after-first-level"` — CTA 何时首次可见
- **可 fork 变体**：
  - 极速体验：`totalDuration: 30`, tutorial `maxDuration: 3`, gameplay `levels: 2`
  - 深度体验：`totalDuration: 60`, gameplay `maxDuration: 45, levels: 5`
  - 无教程：移除 tutorial 阶段，直接进入 gameplay

**配置步骤：**
1. 读取项目的 `game/config.json`
2. 写入 `ux.flow` 配置块，包含 `totalDuration` 和 `phases` 数组
3. 写入 `ux.firstInteractionWithin` 控制首次交互时机
4. 设置 `ux.ctaVisibility` 与 CTA 配置联动
5. 验证各阶段 `maxDuration` 之和 ≤ `totalDuration`

## Result

- **产物**：修改 `game/config.json` 的 UX 流程配置块
- **格式**：JSON patch
- **目标键**：`ux.flow`
- **包含子键**：`totalDuration`, `phases`, `firstInteractionWithin`, `ctaVisibility`

## Binding

- **Binding Role**：`gameConfig`
- **挂载目标**：`game/config.json`
- **引用类型**：`config-key-value`
- **与其他 Skill 的关系**：
  - 与 `difficulty_curve_designer.aiconfig` 联动：gameplay 阶段的 `levels` 应与 `totalLevels` 一致
  - 与 `cta_platform_config.aiconfig` 联动：endcard 阶段的 CTA 配置
  - 与 `playtest_report.aivalidator` 联动：试玩报告按此流程评估体验

## Skill Definition

tools:
  - read
  - write
prompt_extension: |
  You are designing the UX flow for a playable ad (试玩广告).
  The flow follows a strict 4-phase structure:
  1. Loading (≤3s): Show a simple loading screen with brand logo. Use fade transition.
     Player must be able to interact within 3 seconds of the ad loading.
  2. Tutorial (≤8s): Guided-tap interaction showing the core mechanic.
     Auto-skip after 5 seconds if no interaction. Keep it minimal.
  3. Gameplay (≤30s): The core game experience, typically 3 levels.
     This is where the difficulty curve and balance checks apply.
  4. Endcard (no time limit): Show CTA button prominently.
  Read game/config.json, write the ux.flow config block, and validate that
  the sum of phase maxDurations does not exceed totalDuration.
  Ensure firstInteractionWithin is set to 3 seconds or less.
