Skill definition
| Field | Content |
|---|---|
skill_id |
device-fold-state |
skill_name |
设备折展状态适配 |
one_line_purpose |
Provide a unified baseline for hover adaptation, crease avoidance, and open/close continuity for multi-form foldable devices. |
device_scope |
foldable / multi-fold / special-ratio-foldable |
problem_scope |
FoldStatus、悬停态、折痕避让、开合连续性、多段折叠形态映射(如 F/M/G)、内外屏比例差异适配、折展问题修复 |
not_in_scope |
普通手机或平板的常规响应式布局、与折展无关的纯视觉调整 |
primary_outputs |
primary_scene、device_constraints、implementation_notes、fix_plan、verification_matrix |
Core constraints
- First identify the device form and current fold state, then decide the layout and interaction strategy.
- Hover-state orientation decisions follow "scenario structural constraints > foldStatus or foldDisplayMode > crease geometry inference".
- For devices with a "fixed crease axis" (such as a fixed vertical crease), device constraints are allowed to override the single crease rectangle geometry determination; when semantics and geometry conflict, prioritize scenario semantics such as "display on top, operate on bottom".
- Within the same "crease axis cycle", lock the orientation only once; when
foldStatus / foldDisplayMode / 折痕轴changes, the lock must first be cleared before reselecting the orientation, to avoid reusing the old orientation. - Fold adaptation must not rewrite the original business display state machine, and must not forcibly write the business display state inside fold calculation functions.
- The hover state and the unfolded state should reuse the same set of display determination conditions, adjusting only which split screen the content falls on.
- Key content and core interactions must not fall within the crease area.
- Crease split screens must first be unified into the same coordinate system (choose either global or page), and then the boundary calculated; mixing different coordinate systems directly is prohibited.
- Crease positioning should preferentially use the "crease upper boundary/lower boundary" as the partition boundary;
16 vp / 40 vpis only used for content safety spacing, not as a partition anchor. - After opening/closing, no additional operation steps may be introduced, and no scroll offset, input loss, image blur, or playback progress drift may occur.
- Before runtime verification evidence is provided, fold adaptation must not be judged complete.
Three mainline structures
The module mainline is fixed as three blocks; first classify by mainline, then proceed to scenario subdivision:
| Mainline | Official entry | Main scenario | Main resource |
|---|---|---|---|
| Hover adaptation | 4.3 | FOLD-02 |
RSC_FOLD_03 |
| Crease avoidance | 4.4 | FOLD-03 |
RSC_FOLD_05 |
| Open/close continuity | 4.1 | FOLD-07 |
RSC_FOLD_17 |
Note:
FOLD-01、FOLD-04、FOLD-05、FOLD-06belongs to extended scenarios, used for state entry, multi-form/special ratios, and issue fixes.- The overview entry for the three mainlines is
RSC_FOLD_16(./references/fold_adaptation_four_blocks.md)。
Stage tags
| Tag | Stage | Current module focus |
|---|---|---|
REQ |
Requirements analysis and design | Device form, fold state, orientation strategy, display responsibilities |
DEV |
Development | State listening, split-screen layout, crease calculation, open/close continuity, lifecycle recycling |
FIX |
Issue fixes | Fold issue fixes, orientation deviation, state desynchronization, crease crossing, continuity gaps |
VAL |
Feature verification | foldStatus evidence, orientation evidence, crease avoidance screenshots, continuity behavior regression |
Unified output fields
- Routing fields:
active_phases、primary_phase、primary_scene、secondary_scenes、resources_used REQ:device_constraints、capability_boundary、acceptance_focusDEV:code_touchpoints、reuse_resources、implementation_notes、integration_risksFIX:problem_profile、root_cause_hypothesis、fix_plan、regression_watchlistVAL:verification_matrix、evidence_requirements、pass_criteria、residual_risks
Field definitions
device_constraints: refers to the hard adaptation constraints brought by the device fold form, fold state, crease area, and wide-fold characteristics. Indevice-fold-state, this usually means which fold statuses need to be supported, what content is prohibited from being carried in the crease area, and whether orientation reselection is allowed in the hover state.capability_boundary: refers to which device forms and states the current fold solution applies to, which devices or states are not supported, or can only be handled with degradation.acceptance_focus: Refers to the folding/unfolding behavior, directional results, crease avoidance, and state-switching performance that must be confirmed during the requirements phase acceptance.- In scene
deliverables.REQappearsdevice_constraints, indicating that "once this folding/unfolding scene is hit, requirements analysis must first provide a device constraint conclusion," rather than reinventing fields at the scene layer.
AI Retrieval Requirements
- When it involves whether the current state is folded, unfolded, or half-folded, prioritize hitting
FOLD-01。 - When it involves top-bottom split screen in hover state, with display on top and operation on the bottom, prioritize hitting
FOLD-02。 - When it involves content crossing the crease or the tap area falling on the crease, prioritize hitting
FOLD-03。 - When it involves "avoidance area shifted downward/upward, the dividing line not at the centerline, or the status bar causing an overall offset," prioritize jointly hitting
FOLD-03+FOLD-06。 - When it involves increased steps after folding/unfolding, scroll offset, input loss, blurred images, or inconsistent playback progress, prioritize hitting
FOLD-07。 - When it involves multi-segment folding form mapping (such as F/M/G) or adaptation to inner/outer screen ratio differences, prioritize hitting
FOLD-04orFOLD-05。 - When it involves folding/unfolding behavior deviation and a general repair path is needed, prioritize hitting
FOLD-06。 - When it involves "black screen in hover state/only Blank remains, or content swallowed by the full-screen crease," prioritize jointly hitting
FOLD-02+FOLD-03+FOLD-06。 - When it involves "a physical vertical crease but
creaseRectdisplayed as a horizontal wide bar (such as2232x128)," prioritize jointly hittingFOLD-02+FOLD-06, and enable the fixed crease axis determination strategy.
F/M/G Introduction
F: A folding form with a smaller visible area (often used to retain core content).M: An intermediate transitional form (layout usually between compact and expanded).G: An expanded form with a larger visible area (suitable for columns or increasing information density).- Note:
F/M/Gis a general semantic label; the final layout is still based on the real-time window size and breakpoints.
Workflow
Steps
- Based on
intent_signals / applies_whenhit the primary scene (primary_scene) and secondary scene (secondary_scenes)。 - Read by scene
resource_refsandskill_to_path, prioritize loadingP0official path. - Generate phased results (REQ/DEV/FIX/VAL) according to the "unified output fields."
- Complete the required fields according to the "phase output contract" and provide verification evidence requirements.
Output
- Routing fields:
active_phases、primary_phase、primary_scene、secondary_scenes、resources_used。 - Phase fields: output the corresponding structured results according to the
REQ/DEV/FIX/VALcontract.
Checklist
- has hit at least one
FOLD-*scene, and explain the basis for the hit. - has prioritized the use of
P0official resources,P1template resources are only used to accelerate implementation. - has output all required fields for the current phase (see "Phase Output Contract").
- has included folding/unfolding verification evidence requirements and a remaining risk statement.
Scene Index
FOLD-01 Folded state detection and state-switching response
scene_id: FOLD-01
scene_name: 折叠状态检测与状态切换响应
phase_tags: [REQ, DEV, FIX, VAL]
priority: P0
intent_signals:
- FoldStatus
- foldStatusChange
- 展开态
- 折叠态
- 半折叠态
applies_when:
- 需要识别折叠态、展开态、半折叠态
- 当前问题表现为状态变化后界面未更新
not_applies_when:
- 问题只涉及常规平板布局,没有折展状态输入
decisions:
- 选择状态来源、监听点和刷新入口
- 确定状态变化后的布局刷新和兜底行为
deliverables:
REQ:
- device_constraints
- capability_boundary
- acceptance_focus
DEV:
- code_touchpoints
- reuse_resources
- implementation_notes
- integration_risks
FIX:
- problem_profile
- root_cause_hypothesis
- fix_plan
- regression_watchlist
VAL:
- verification_matrix
- evidence_requirements
- pass_criteria
- residual_risks
resource_refs:
- RSC_FOLD_01
- RSC_FOLD_02
skill_to_path:
- skill: 折叠状态检测
path: ./references/fold_status_detection.md
FOLD-02 Top-bottom split screen and interaction layout in hover state
scene_id: FOLD-02
scene_name: 悬停态上下分屏与交互布局
phase_tags: [REQ, DEV, FIX, VAL]
priority: P0
intent_signals:
- 悬停态
- HALF_FOLDED
- 上下分屏
- 上展示下操作
applies_when:
- 页面在悬停态需要将展示区和操作区拆到上下分屏
- 当前问题表现为悬停态布局职责混乱
not_applies_when:
- 页面没有悬停态交互设计
decisions:
- 明确上半屏和下半屏的职责分配
- 明确方向锁定策略和退出悬停后的恢复策略
deliverables:
REQ:
- device_constraints
- capability_boundary
- acceptance_focus
DEV:
- code_touchpoints
- reuse_resources
- implementation_notes
- integration_risks
FIX:
- problem_profile
- root_cause_hypothesis
- fix_plan
- regression_watchlist
VAL:
- verification_matrix
- evidence_requirements
- pass_criteria
- residual_risks
resource_refs:
- RSC_FOLD_03
- RSC_FOLD_04
skill_to_path:
- skill: 悬停态上下分屏与交互
path: ./references/hover_state_interaction.md
FOLD-03 Crease area avoidance
scene_id: FOLD-03
scene_name: 折痕区域避让
phase_tags: [REQ, DEV, FIX, VAL]
priority: P0
intent_signals:
- 折痕
- CreaseRegion
- getFoldCreaseRegion
- 内容被劈开
- 避让区偏下
- 分界线不在中线
- 状态栏偏移
applies_when:
- 关键内容或交互可能落在折痕区域
- 状态变化后需要重新计算折痕避让范围
not_applies_when:
- 设备没有折痕区域输入
decisions:
- 确定折痕区域获取方式和重算时机
- 决定哪些内容必须远离折痕
- 先映射折痕矩形到页面坐标,再计算分界线,禁止未映射直接参与布局
- 上分区下边界锚定折痕上边界,下分区上边界锚定折痕下边界
- `16 vp / 40 vp` 仅作为分区内部内容安全间距,不替代边界定位
- 若页面根节点有 `globalPosition` 偏移,必须在同单位下扣减后再分区
deliverables:
REQ:
- device_constraints
- capability_boundary
- acceptance_focus
DEV:
- code_touchpoints
- reuse_resources
- implementation_notes
- integration_risks
FIX:
- problem_profile
- root_cause_hypothesis
- fix_plan
- regression_watchlist
VAL:
- verification_matrix
- evidence_requirements
- pass_criteria
- residual_risks
resource_refs:
- RSC_FOLD_05
- RSC_FOLD_06
skill_to_path:
- skill: 折痕区域避让
path: ./references/crease_avoidance.md
FOLD-07 Open/close continuity assurance
scene_id: FOLD-07
scene_name: 开合连续性保障
phase_tags: [REQ, DEV, FIX, VAL]
priority: P0
intent_signals:
- 开合连续性
- 操作步骤增加
- 页面滚动位置偏移
- 输入内容丢失
- 图片模糊
- 播放进度不一致
applies_when:
- 折叠/展开后出现状态断档,导致操作路径变长或体验降级
- 需要保证滚动、输入、图像和媒体时间轴在折展后的连续性
not_applies_when:
- 问题仅为静态布局差异,不涉及状态连续
decisions:
- 明确哪些状态必须跨折展保持(滚动锚点、输入草稿、媒体时间轴)
- 明确恢复链路触发时机,禁止基于过期视口恢复
- 明确降级策略回收点,避免质量衰减累积
deliverables:
REQ:
- device_constraints
- capability_boundary
- acceptance_focus
DEV:
- code_touchpoints
- reuse_resources
- implementation_notes
- integration_risks
FIX:
- problem_profile
- root_cause_hypothesis
- fix_plan
- regression_watchlist
VAL:
- verification_matrix
- evidence_requirements
- pass_criteria
- residual_risks
resource_refs:
- RSC_FOLD_17
- RSC_FOLD_01
skill_to_path:
- skill: 开合连续性
path: ./references/fold_continuity.md
- skill: 折叠状态检测
path: ./references/fold_status_detection.md
FOLD-04 Multi-segment folding form state adaptation
scene_id: FOLD-04
scene_name: 多段折叠形态状态适配
phase_tags: [REQ, DEV, FIX, VAL]
priority: P1
intent_signals:
- 多段折叠
- 多形态折展
- F/M/G
- 形态映射
applies_when:
- 目标设备存在多段折叠形态差异(可映射为 F/M/G 等)
- 当前问题表现为某一形态下方向或结构判断错误
not_applies_when:
- 设备仅存在单一折展形态,无需形态映射
decisions:
- 形态映射基线:可将不同设备形态抽象为“小可视区/中间态/大可视区”等统一语义(如 F/M/G)
- 确定不同折叠组合下的布局和方向策略
- 形态标签只作为语义入口,真实布局空间仍以运行时窗口尺寸和断点判定
- 明确“大可视区形态”下的方向和信息密度策略
deliverables:
REQ:
- device_constraints
- capability_boundary
- acceptance_focus
DEV:
- code_touchpoints
- reuse_resources
- implementation_notes
- integration_risks
FIX:
- problem_profile
- root_cause_hypothesis
- fix_plan
- regression_watchlist
VAL:
- verification_matrix
- evidence_requirements
- pass_criteria
- residual_risks
resource_refs:
- RSC_FOLD_07
- RSC_FOLD_01
skill_to_path:
- skill: 多段折叠形态状态适配
path: ./references/multi_fold_states.md
- skill: 折叠状态检测
path: ./references/fold_status_detection.md
FOLD-05 Special-ratio foldable screen adaptation (inner/outer screen differences)
scene_id: FOLD-05
scene_name: 特殊比例折叠屏适配(内外屏差异)
phase_tags: [REQ, DEV, FIX, VAL]
priority: P1
intent_signals:
- 特殊比例折叠屏
- 1:1 外屏
- 16:10 内屏
- 内外屏比例差异
applies_when:
- 目标设备存在明显的外屏和内屏比例差异
- 需要处理宽折叠内容密度或导航形式变化
not_applies_when:
- 设备不具备宽折叠屏幕特征
decisions:
- 定义外屏与内屏的布局差异
- 决定哪些内容在外屏裁剪、隐藏或延后展示
deliverables:
REQ:
- device_constraints
- capability_boundary
- acceptance_focus
DEV:
- code_touchpoints
- reuse_resources
- implementation_notes
- integration_risks
FIX:
- problem_profile
- root_cause_hypothesis
- fix_plan
- regression_watchlist
VAL:
- verification_matrix
- evidence_requirements
- pass_criteria
- residual_risks
resource_refs:
- RSC_FOLD_08
- RSC_FOLD_03
- RSC_FOLD_09
- RSC_FOLD_10
- RSC_FOLD_11
- RSC_FOLD_12
skill_to_path:
- skill: 特殊比例折叠屏适配
path: ./references/special_form_factor_foldable_adaptation.md
- skill: 悬停态上下分屏与交互
path: ./references/hover_state_interaction.md
FOLD-06 General repair path for folding/unfolding issues
scene_id: FOLD-06
scene_name: 折展问题通用修复路径
phase_tags: [DEV, FIX, VAL]
priority: P0
intent_signals:
- 折展问题修复
- 悬停态错乱
- 方向偏差
- 折痕跨越
- 连续性断档
- 生命周期回收
applies_when:
- 已有页面在折展态出现行为偏差,需要修复但不重构页面架构
- 需要按“问题描述-根因分析-通用修复方案”输出修复路径
not_applies_when:
- 当前任务是新页面从零设计
decisions:
- 先归类问题类型,再选对应通用修复模板,避免按页面类型定制
- 修复顺序统一为:监听入口 -> 几何/状态 -> 布局/交互 -> 生命周期回收 -> 回归验证
- 方向与分界线优先基于真实折痕几何,不使用经验比例硬编码
- 出现“避让区偏下/偏上”时,先排查坐标系混用与“中线 + 固定偏移”策略,再排查布局容器约束
- 禁止在折展修复中改写业务状态机语义
deliverables:
DEV:
- code_touchpoints
- reuse_resources
- implementation_notes
- integration_risks
FIX:
- problem_profile
- root_cause_hypothesis
- fix_plan
- regression_watchlist
VAL:
- verification_matrix
- evidence_requirements
- pass_criteria
- residual_risks
resource_refs:
- RSC_FOLD_01
- RSC_FOLD_03
- RSC_FOLD_05
- RSC_FOLD_13
skill_to_path:
- skill: 折叠状态检测
path: ./references/fold_status_detection.md
- skill: 悬停态上下分屏与交互
path: ./references/hover_state_interaction.md
- skill: 折痕区域避让
path: ./references/crease_avoidance.md
- skill: 折展问题修复场景库
path: ./references/bug-fix-cases.md
Resource Index
Complete resource cards have been moved down to ./references/resource-index.md, and the main file retains only the retrieval entry and output contract.
Usage order:
- Prioritize reading
P0official path as the primary solution. P1Engineering template resources are supplementary only and cannot replace the official baseline.
Resource grouping:
- Official main path:
RSC_FOLD_01、RSC_FOLD_03、RSC_FOLD_05、RSC_FOLD_07、RSC_FOLD_08、RSC_FOLD_16、RSC_FOLD_17 - Official API templates and issue fix resources:
RSC_FOLD_02、RSC_FOLD_04、RSC_FOLD_06、RSC_FOLD_09toRSC_FOLD_13
Stage output contract
REQ
- Must output:
active_phases、primary_phase、primary_scene、secondary_scenes - Must output:
device_constraints、capability_boundary、acceptance_focus - Additional requirements: specify the current device form factor, current fold state, orientation strategy, and top/bottom split-screen responsibilities
DEV
- Must output:
code_touchpoints、reuse_resources、implementation_notes、integration_risks - Additional requirements: specify the state listening entry point, crease calculation entry point, split-screen component placement, and lifecycle cleanup point
FIX
- Must output:
problem_profile、root_cause_hypothesis、fix_plan、regression_watchlist - Additional requirements: specify whether the issue is missing state listening, incorrect orientation lock, incorrect crease mapping, or a broken legacy state machine
VAL
- Must output:
verification_matrix、evidence_requirements、pass_criteria、residual_risks - Additional requirements: include at least
foldStatusresults, orientation information, window geometry, or screenshot evidence, and verify that the original display logic has not been broken