---
name: difficulty_curve_designer.aiconfig
description: 试玩广告全局难度曲线设计配置 - 定义关卡难度递进策略，包括首关保胜、峰值关卡、CTA 触发时机
triggers: 难度曲线,difficulty curve,关卡难度,level difficulty,曲线设计,progression,试玩广告难度,playable-ads difficulty
---

# difficulty_curve_designer.aiconfig

试玩广告全局难度曲线设计配置。定义关卡难度递进策略，包括：

- **首关保胜**：第一关必须保证玩家成功，建立正反馈
- **峰值体验**：在第 3 关左右制造峰值难度，让玩家感受到挑战
- **CTA 触发时机**：峰值体验后触发 CTA，利用玩家的高参与度
- **难度回落**：峰值后适当降低难度，给予"差一点就赢"的体验，驱动下载

## Recipe

- **配置方式**：参数化（parametric）
- **核心参数**：
  - `curveType`: `"playable-ads-standard"` — 试玩广告标准曲线
  - `firstLevelGuaranteeWin`: `true` — 首关保胜
  - `peakDifficultyLevel`: `3` — 峰值难度在第几关
  - `ctaTriggerAfterLevel`: `3` — CTA 在第几关后触发
  - `totalLevels`: `5` — 总关卡数
  - `difficultyScale`: `[0.2, 0.4, 0.8, 0.6, 0.5]` — 每关难度系数（0-1）
- **可 fork 变体**：
  - 急速体验：`totalLevels: 3`, `difficultyScale: [0.2, 0.7, 0.5]`
  - 平缓入门：`difficultyScale: [0.1, 0.2, 0.5, 0.8, 0.4]`
  - 持续攀升（失败驱动下载）：`difficultyScale: [0.2, 0.4, 0.6, 0.8, 1.0]`

**配置步骤：**
1. 读取项目的 `game/config.json`
2. 写入 `difficulty.curve` 配置块，包含曲线类型和关卡参数
3. 写入 `difficulty.scale` 数组，定义每关的难度系数
4. 设置 `difficulty.firstLevelGuaranteeWin` 标志
5. 关联 CTA 触发时机 `cta.triggerAfterLevel`

## Result

- **产物**：修改 `game/config.json` 的难度曲线配置块
- **格式**：JSON patch
- **目标键**：`difficulty.curve`
- **包含子键**：`curveType`, `firstLevelGuaranteeWin`, `peakDifficultyLevel`, `totalLevels`, `difficultyScale`

## Binding

- **Binding Role**：`gameConfig`
- **挂载目标**：`game/config.json`
- **引用类型**：`config-key-value`
- **与其他 Skill 的关系**：
  - 与 `ux_flow_spec.aiconfig` 联动：`totalLevels` 应与 UX 流程的 gameplay 阶段一致
  - 与 `gameplay_balance_check.aivalidator` 联动：校验器会读取此配置检查平衡性

## Skill Definition

tools:
  - read
  - write
prompt_extension: |
  You are designing the difficulty curve for a playable ad (试玩广告).
  The curve must follow the "hook → challenge → CTA" pattern:
  1. Level 1 MUST guarantee player success (firstLevelGuaranteeWin: true)
  2. Difficulty ramps up to a peak around level 3 (peakDifficultyLevel)
  3. After the peak, trigger CTA while engagement is highest
  4. Post-peak levels should feel "almost winnable" to drive downloads
  Read game/config.json, apply the difficulty.curve config patch, and save.
  The difficultyScale array values range from 0.0 (trivial) to 1.0 (impossible).
  Total playable ad duration should stay within 30-60 seconds across all levels.
