phase z catalog: Step 7-A (layouts) + 8-A (regions/display) 박힘
사용자 lock 2026-05-07 — catalog data 는 yaml/HTML 에서 사람이 보고 modify 가능 (= hardcoded dict 위배 제거). 추가: - templates/phase_z2/layouts/layouts.yaml — 8 preset (single / horizontal-2 / vertical-2 / top-1-bottom-2 / top-2-bottom-1 / left-1-right-2 / left-2-right-1 / grid-2x2). 기존 hardcoded LAYOUT_PRESETS dict (src/phase_z2_composition.py) → catalog 이전. backward compat (load_layout_presets() 가 같은 dict shape). 필드: zones / topology / positions / css_areas / css_cols / css_rows / render_ready / default_selection / candidate_when. (Step 7-A) - templates/phase_z2/layouts/layouts_preview.html — 8 preset 시각 검증. - templates/phase_z2/regions/region_layouts.yaml — Internal Region 6 entry (region-single / vertical-stack / horizontal-split / main-support / preview-details / grid-2x2). SPEC §2.5 의 sequential first-match decision tree. region-vertical-stack only default_fallback. (Step 8-A) - templates/phase_z2/regions/display_strategies.yaml — display 4 entry (inline_full / inline_preview_with_details / details_only / dropped). applies_to / forbidden_for / detail_trigger.placement: top-right. 사용자 절대 lock: text/table/image/details 절대 dropped X (forbidden_for). - templates/phase_z2/regions/regions_preview.html — 6 region + 4 display 카드 시각 검증 (axis 분리 lock — region structure ≠ display policy). axis 분리 lock (사용자 2026-05-07): - region (structure axis) ≠ display (policy axis) → 두 catalog 분리. - preserves_original 은 display_strategies 의 single source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
95
templates/phase_z2/regions/region_layouts.yaml
Normal file
95
templates/phase_z2/regions/region_layouts.yaml
Normal file
@@ -0,0 +1,95 @@
|
||||
# Phase Z Region Layout Catalog (Internal Region structure)
|
||||
#
|
||||
# User lock (2026-05-07) — Step 8-A:
|
||||
# Internal Region (= child zone) layout vocabulary catalog.
|
||||
# Source: docs/architecture/PHASE-Z-CONTENT-OBJECT-SUBZONE-SPEC.md §2.5 (v1, 6 entry).
|
||||
# Code connection (2026-05-08, Step 8-conn):
|
||||
# src/phase_z2_composition.py::load_region_layouts() reads this file.
|
||||
# src/phase_z2_pipeline.py step08 artifact records select_region_layout_candidates() output
|
||||
# per zone (placeholder signals: region_count=1, Step 3/4 부재 종속).
|
||||
# Step 9 v0 (application_plan) consumes the candidate list per unit.
|
||||
#
|
||||
# Hierarchy:
|
||||
# Slide -> Layout (slide-body zone 분배)
|
||||
# -> Zone -> Internal Region (this catalog) -> Frame -> Frame Slot -> Content
|
||||
#
|
||||
# Decision rule (SPEC §2.5 deterministic, AI X):
|
||||
# 1. region_count == 1 -> region-single
|
||||
# 2. details_presence == true / large content -> region-preview-details
|
||||
# 3. region_count == 4 AND 4 equal items -> region-grid-2x2
|
||||
# 4. region_count == 2 AND primary+supporting + ratio -> region-main-support
|
||||
# 5. region_count == 2 AND visual element (image/diagram)-> region-horizontal-split
|
||||
# 6. fallback -> region-vertical-stack
|
||||
#
|
||||
# Per-entry fields:
|
||||
# region_count: int | str (e.g. 1, 2, 4, "2+")
|
||||
# topology: vertical | horizontal | grid | weighted | preview-details | single
|
||||
# default_fallback: bool (true only for region-vertical-stack — SPEC §2.5)
|
||||
# description: str
|
||||
# candidate_when: dict (decision rule signals — Step 8-B input)
|
||||
|
||||
|
||||
region-single:
|
||||
region_count: 1
|
||||
topology: single
|
||||
default_fallback: false
|
||||
description: 1 region (zone entire = single region)
|
||||
candidate_when:
|
||||
region_count: 1
|
||||
|
||||
|
||||
region-vertical-stack:
|
||||
region_count: "2+"
|
||||
topology: vertical
|
||||
default_fallback: true
|
||||
description: Vertical top-bottom stack. Default fallback when no other rule matches.
|
||||
candidate_when:
|
||||
region_count_ge: 2
|
||||
flow_type: sequential
|
||||
|
||||
|
||||
region-horizontal-split:
|
||||
region_count: 2
|
||||
topology: horizontal
|
||||
default_fallback: false
|
||||
description: Left-right horizontal split (text + image, text + diagram).
|
||||
candidate_when:
|
||||
region_count: 2
|
||||
has_visual_element: true # image / diagram in content_type_mix
|
||||
|
||||
|
||||
region-main-support:
|
||||
region_count: 2
|
||||
topology: weighted
|
||||
default_fallback: false
|
||||
description: Main region + supporting region (asymmetric ratio, e.g. 0.7 / 0.3).
|
||||
ratios_default: [0.7, 0.3]
|
||||
candidate_when:
|
||||
region_count: 2
|
||||
role_pattern: primary_supporting
|
||||
ratio_asymmetric: true # max / min >= 2
|
||||
|
||||
|
||||
region-preview-details:
|
||||
region_count: 2
|
||||
topology: preview-details
|
||||
default_fallback: false
|
||||
description: Inline preview region + details/popup region.
|
||||
# preserves_original 은 display_strategies.yaml 의 책임 (axis 분리 lock 2026-05-07).
|
||||
# User lock (원문 무손실 보존) 은 display_strategies 의 inline_preview_with_details
|
||||
# / details_only 의 preserves_original: true 로 single source of truth 박힘.
|
||||
candidate_when:
|
||||
or:
|
||||
- details_presence: true
|
||||
- large_table: ">= 5 rows"
|
||||
- long_text: true
|
||||
|
||||
|
||||
region-grid-2x2:
|
||||
region_count: 4
|
||||
topology: grid
|
||||
default_fallback: false
|
||||
description: 2x2 grid (4 equal regions).
|
||||
candidate_when:
|
||||
region_count: 4
|
||||
flow_type: parallel_4
|
||||
Reference in New Issue
Block a user