Commit Graph

122 Commits

Author SHA1 Message Date
f7a9240fe5 fix(IMP-04): F18 F1 follow-ups — defaults + narrow alias + cardinality clarify
Same-frame F1 follow-up per Codex round 43 (#15527). matrix §4.1 Fix 7
4-class F1 path (no Track A pause, small fixes + Codex re-review).

Three fixes :

1. F1-a — explicit col_a/col_b label defaults
   - Previous (c7b0f5b) used empty defaults `col_a_label_default: ""` /
     `col_b_label_default: ""`, so an upstream MDX path without explicit
     column headers would render blank header cells.
   - Fix : set `col_a_label_default: "BIM"` and `col_b_label_default: "DX"`
     in F18 contract. Frame intent is the BIM-vs-DX comparison, so the
     headers are semantic and must not silently become blank.

2. F1-b — narrow prefix-stripping aliases (parser → builder option)
   - Previous parser used a broad regex
     `^[A-Za-z가-힣]{1,8}\s*:\s*(.+)$` to strip any short prefix before
     `:`. That could accidentally remove meaningful Korean/English
     prefixes from real cell content.
   - Fix : remove auto-stripping from `parse_compare_row_2col_item`.
     Stripping is now configurable via builder option
     `strip_col_prefix_aliases: [<list of exact aliases>]` and applied
     by `_build_compare_table_2col`. F18 contract uses `["BIM", "DX"]`,
     so only `BIM:` / `DX:` (with optional fullwidth `:`) prefixes are
     stripped; other Korean/English colons in real content stay intact.
   - Parser signature unchanged. Builder is the single place that owns
     the stripping policy.

3. F1-c — cardinality semantic clarification
   - Previous top-level `cardinality.strict: 2` was ambiguous: it could
     be read as `row strict: 2`. Rows are actually `1..12` via
     `sub_zones.rows.cardinality`.
   - Fix : add YAML comment that the top-level strict 2 = column count
     (col_a / col_b), not row count. Per-sub_zone cardinality remains
     authoritative for rows.

Verification :
- python -m py_compile src/phase_z2_mapper.py : PASS
- python scripts/smoke_frame_render.py --self-check : PASS 7/7 (F18
  fixture rendered unchanged at 4211 chars; smoke harness only loaded
  the partial, builder/parser logic not directly exercised in smoke)
- Manual builder/parser invocation test with synthetic units :
  - col_a_label / col_b_label resolve to "BIM" / "DX" defaults.
  - `BIM: Only 3D` → `Only 3D` (alias-stripped).
  - `DX: BIM << DX (ENG. 포함)` → `BIM << DX (ENG. 포함)` (alias-stripped).
  - `분야별 단절` → `분야별 단절` (no BIM/DX prefix, untouched).
  - This matches the F1-b narrow-alias intent.
- python scripts/smoke_frame_render.py bim_dx_comparison_table
  --render-to data/runs/imp04_f18_visual_r2 : PASS, R3 artifact written
  with same character count, generic viewer title.

scope-lock honored : no V4 logic, no new builder/parser added (only
behavior refinement of existing F18 builder/parser/contract), no other
partial, no Phase Z production render, no Phase R'/AI/Kei changes.

4-class status (F18 post-F1) :
- class 1 readiness : adapter cleanup complete — defaults explicit,
  aliases narrow, cardinality semantically clear.
- class 2 content-fit : still a watch item (long Korean wrapping,
  6+ rows). max_rows=12 protection unchanged.
- class 3 / 4 : N/A.

Refs Gitea #4 (IMP-04 Track A frame 4 — F1 follow-up per Codex round 43)
2026-05-13 12:21:02 +09:00
c7b0f5bde1 feat(catalog): activate bim_dx_comparison_table (IMP-04 Track A 4/16)
Reason : V4 UAI=1 (01-2 "용어간 상호관계") — UAI tier strongest after F12/F11.
Track A frame 4 per Codex round 41 V4-priority acceptance.

3-layer architecture (matrix §0) :
- V4 = matching authority — V4 ranked this frame use_as_is for 01-2.
- figma_to_html (1171281195) = source/evidence — analysis/texts/index.html/
  flat/assets all present.
- Phase Z = runtime orchestration — adds catalog + new builder + new parser +
  new partial + smoke fixture.

NEW builder + NEW parser (Codex round 41 mandatory review path) :

1. src/phase_z2_mapper.py — NEW `compare_row_2col_item` parser in ITEM_PARSERS
   - input : (top_line, nested_lines)
   - output : {label, col_a, col_b}
   - label = bold from top_line
   - col_a / col_b = first 2 nested bullets, optional prefix stripping ("BIM:"/
     "DX:" or similar ≤8-char tag with colon)
   - inline emphasis preserved as <strong>

2. src/phase_z2_mapper.py — NEW `compare_table_2col` PAYLOAD_BUILDERS entry
   - payload : title + col_a_label + col_b_label + rows[]
   - builder_options : item_parser, col_a/b_label_default, max_rows (default 999)
   - max_rows truncation tracked via _truncated_count

3. templates/phase_z2/families/bim_dx_comparison_table.html — NEW partial
   - 3-column grid (category / col_a / col_b) with header row + N data rows
   - PROMOTED CSS : title gradient (#000#883700, zone-title family), header
     brown bg (rgba(50,31,9,0.85-0.95)), zebra striping, brown family bullet
     accent, subtle border (#A5BBB4 F11 family).
   - NOT PROMOTED (P1 case-by-case + preservation guardrail) : Figma column
     header raster icons, color emphasis variants, hanja deco. figma_to_html
     source evidence remains preserved.
   - ADAPTED : Figma absolute positioning + zoom → Phase Z flex/grid 3-col
     table, typography → token-fixed, row heights auto content-fit.

4. templates/phase_z2/catalog/frame_contracts.yaml — F18 contract appended
   - frame_id=1171281195, family=table, source_shape=top_bullets, strict 2
     (2 columns), role_order=[col_a, col_b].
   - visual_hints.min_height_px = 350 (title 30 + header 30 + 6 rows×35 +
     padding 30 = 300 + 50 buffer; F14-class).
   - accepted_content_types = [text_block].
   - sub_zones : col_a_header / col_b_header (strict 1 each) + rows (min 1,
     max 12 category rows).

5. scripts/smoke_frame_render.py — bundled fixture for F18 self-check (6
   category rows : 범위 / S/W / 프로세스 / 성과물 / 활용 / 수행개념).

Verification :
- python -m py_compile src/phase_z2_mapper.py scripts/smoke_frame_render.py
  : PASS
- python scripts/smoke_frame_render.py --self-check : PASS 7/7 (F18 added
  at 4211 chars CSS-only)
- python scripts/smoke_frame_render.py bim_dx_comparison_table --render-to
  data/runs/imp04_f18_visual : PASS, R3 artifact, 0 raster refs (CSS-only)
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_f18_regression :
  PASS (MDX 03 V4 rank-1 still F13/F29; F18 only routes 01-2 per V4)

scope-lock honored (3-layer + 4-class) :
- V4 logic / V4 evidence yaml : unchanged
- Existing PAYLOAD_BUILDERS (4 builders) : unchanged. compare_table_2col added
  as NEW entry.
- Existing ITEM_PARSERS (2 parsers) : unchanged. compare_row_2col_item added
  as NEW entry.
- Existing 6 partials : unchanged.
- Composition planner / production render / Phase R' / AI/Kei : unchanged.

4-class status :
- class 1 readiness :  contract + new builder + new parser + partial +
  smoke fixture + R3 artifact aligned.
- class 2 content-fit : watch — cell content single-line; long Korean
  sentences may wrap. Row height auto handles wrap; max_rows=12 limit
  protects vertical overflow.
- class 3/4 : N/A.

Codex review mandatory per scope-lock §5 (new builder pattern first
introduction : compare_table_2col).

Refs Gitea #4 (IMP-04 Track A frame 4 — V4 UAI tier, NEW builder)
2026-05-13 12:13:11 +09:00
a4fdc7ad89 feat(catalog): activate construction_bim_three_usage (IMP-04 Track A 3/16)
Reason : V4 UAI=1 (01-1) + RS=1 — UAI tier strongest after F12. Track A
frame 3 per Codex round 39 V4-priority acceptance.

3-layer architecture context (matrix §0) :
- V4 = matching authority — V4 ranked this frame as use_as_is for 01-1
  ("용어 정의") and restructure=1 for other sections.
- figma_to_html (1171281182) = rich source/evidence — 401-line index.html
  + 4 PNG assets, full A+T+I+F+S resource available.
- Phase Z = runtime orchestration — this commit adds catalog + partial +
  smoke fixture for the runtime projection.

Builder reuse (Codex round 39 secondary criterion) :
- Reuses existing `quadrant_flat_slots` (F16) with pad_to=3 +
  label_key_pattern="category_{n}_label" + body_key_pattern="category_{n}_body".
- Same parser `quadrant_item` reused — no new builder or parser added.
- F16 / F11 share flat-keyed label+body grammar; only N differs (4 vs 3).

3 file changes :

1. templates/phase_z2/families/construction_bim_three_usage.html
   - Adapted from figma_to_html_agent/blocks/1171281182/index.html.
   - 3 horizontal stacked rows (brown label box + white card with green
     border, per Figma L82-103). Compact Phase Z zone fit.
   - PROMOTED CSS : brown label box (rgba(50,31,9,0.8) + 둥글기 + drop-
     shadow), white card with green border (#A5BBB4), title gradient
     (#000#883700 F13/F14/F12 family), bullet markers in brown family.
   - NOT PROMOTED (P1 case-by-case + preservation guardrail per Codex
     round 37 / matrix §4.1 Fix 7) : title-icon (50×50 small), card_decor
     × 3 (decorative side images), bottom BIM 모델/공사 Process 다이어그램.
     Figma source evidence preserved in figma_to_html_agent/; not promoted
     to Phase Z compact projection.
   - ADAPTED : Figma 50/45/38/30 px → token-fixed, 1248×1066 absolute +
     zoom 0.67542 → Phase Z flex column 3-row stack, 335×124 label box
     → 110×~50 compact (zone fit).

2. templates/phase_z2/catalog/frame_contracts.yaml
   - F11 contract appended after F12.
   - frame_id=1171281182, family=cards, source_shape=top_bullets, strict
     cardinality 3, role_order=[category_1, category_2, category_3].
   - visual_hints.min_height_px = 320 (title 30 + 3×70 row + gaps 12 +
     padding 30 = 282 + 38 safety buffer).
   - accepted_content_types = [text_block] only.
   - 3 sub_zones (category_1/2/3 main_text).
   - payload.builder = quadrant_flat_slots (reuse) with category_{n}_*
     key patterns.

3. scripts/smoke_frame_render.py
   - Bundled fixture for F11 self-check.

Verification :
- python -m py_compile scripts/smoke_frame_render.py : PASS
- python scripts/smoke_frame_render.py --self-check : PASS 6/6 (F11
  added at 3014 chars, compact CSS-only)
- python scripts/smoke_frame_render.py construction_bim_three_usage
  --render-to data/runs/imp04_f11_visual : PASS, R3 artifact written,
  0 raster refs (CSS-only), copy_assets ran (4 PNGs in assets/ dir
  for future fidelity-review if needed)
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_f11_regression
  : PASS (MDX 03 V4 rank-1 still F13/F29, F11 not triggered for MDX 03 —
  F11 only routes 01-1 per V4 evidence)

scope-lock honored (3-layer + 4-class) :
- V4 logic / V4 evidence yaml : unchanged
- Existing PAYLOAD_BUILDERS 4 builders (incl. F12's cycle_intersect_3) :
  unchanged. F11 reuses quadrant_flat_slots (secondary criterion).
- Existing ITEM_PARSERS : unchanged. F11 reuses quadrant_item.
- Existing partials (F13/F29/F16/F14/F12) : unchanged.
- Composition planner / production render path / Phase R' / AI/Kei :
  unchanged.

4-class status :
- class 1 adapter/runtime readiness :  contract + builder + partial +
  smoke fixture + R3 artifact aligned.
- class 2 content-fit : watch — 3 rows × ~70 px height. If MDX body has
  4+ bullets per category, may overflow. realistic use case (01-1) shows
  1-2 bullets per category per analysis.md, so within budget.
- class 3 / 4 : N/A.

Refs Gitea #4 (IMP-04 Track A frame 3 — V4 UAI tier, builder reuse)
2026-05-13 12:05:05 +09:00
766fa4639d fix(IMP-04): F12 F1 follow-ups — intersection optional + smoke title generic
Same-frame F1 follow-up commit per Codex round 37 (#15503). Matrix §4.1
Fix 7 4-class: F1 = small same-frame fix + Codex re-review (not F2/F3,
no Track A pause needed).

Two fixes (both Codex-caught) :

1. F1-a — `intersection` sub_zone contract semantics
   - Previous (c67609c) declared `cardinality: { strict: 1 }` on the
     intersection sub_zone, while the builder used `intersection_default: ""`
     and the partial hides empty intersection. That mismatch meant
     production payloads could silently omit the center concept while
     the contract still demanded strict 1.
   - Fix : `cardinality: { min: 0, max: 1 }` — intersection is now
     explicitly optional, matching analysis.md "slots 5개, required 4개"
     (intersection was originally the optional 5th slot).
   - Builder behavior unchanged (intersection_default = "" still
     produces empty when MDX has no center text; partial's :empty hide
     remains semantically correct).

2. F1-b — smoke harness viewer title leakage
   - Previous harness output had `<title>F14 render artifact — {template_id}</title>`
     hardcoded from the original F14-specific implementation.
   - Fix : generic `<title>Phase Z render artifact — {template_id}</title>`.
   - Affects all `--render-to` dev artifacts going forward.

Verification :
- python scripts/smoke_frame_render.py --self-check : PASS 5/5
- python scripts/smoke_frame_render.py construction_goals_three_circle_intersection
  --render-to data/runs/imp04_f12_visual_r2 : PASS, generated title now reads
  "Phase Z render artifact — construction_goals_three_circle_intersection"
- Catalog yaml parse : intersection cardinality = {min: 0, max: 1}

scope-lock honored : no V4 logic, no builder/parser logic, no other
partial, no Phase Z production render, no Phase R'/AI/Kei changes. F1
fix scope only.

Refs Gitea #4 (IMP-04 Track A frame 2 — F1 follow-up per Codex round 37)
2026-05-13 11:57:45 +09:00
c67609c083 feat(catalog): activate construction_goals_three_circle_intersection (IMP-04 Track A 2/16)
Reason : V4 strongest UAI tier candidate (use_as_is=1 for 02-1, light_edit=1
for 01-1, restructure=1). Track A frame 2 per Codex rounds 30/33/35 V4-
priority rule. F14 clean pass completed at 834ed39; this is the next
Track A activation.

3-layer architecture context (matrix §0) :
- V4 = matching authority — V4 ranked this frame as use_as_is for the
  "DX의 궁극적 목표" section (02-1) and light_edit for "용어 정의" (01-1).
- figma_to_html (1171281189) = rich source/evidence — 510-line index.html
  base, full analysis/flat/texts/assets present (A+T+I+F+S).
- Phase Z = runtime orchestration — this commit adds the runtime contract,
  builder, partial, and fixture so the V4 candidate can be assembled.

New runtime additions :

1. src/phase_z2_mapper.py — new `cycle_intersect_3` PAYLOAD_BUILDERS entry
   - Reuses existing `quadrant_item` ITEM_PARSERS (label only, body
     ignored) — F16 parser reused, no new parser.
   - Produces flat keys : circle_1_label / circle_2_label / circle_3_label
     + intersection text (optional) — distinct from F16's quadrant_N_body
     structure since this frame's 3 main circles use labels only.
   - pad_to=3, truncate_at=3, configurable via builder_options.

2. templates/phase_z2/families/construction_goals_three_circle_intersection.html
   - Adapted from figma_to_html_agent/blocks/1171281189/index.html.
   - Slot mapping : title + 3 circle labels + optional intersection text.
   - PROMOTED CSS : 3 circle gradients (safety #BC652B/#A24200, productivity
     #897445/#3E3523, trust #296B55/#123328) + outer multiply blend +
     title gradient (#000#883700, F13/F14 zone-title family) + main
     label typography (white text + shadow).
   - NOT PROMOTED (P1 case-by-case, compact zone fit) : 6 accent hanja
     circles (安/質/速/利/通/信), 6 side labels (안전성 제고 etc.), 3
     decoration rects, 3 arc images, bg-texture multiply image. These
     are Figma-side decorative content not in MDX and would clutter a
     Phase Z zone of ~320 px.
   - ADAPTED : Figma 70/50/40 px → token-fixed font sizes, 350×350
     absolute-positioned overlapping circles → 110×110 flex row (cycle
     intent expressed via intersection text instead of geometric overlap).

3. templates/phase_z2/catalog/frame_contracts.yaml — append F12 contract
   - template_id, frame_id 1171281189, family=diagram, source_shape=
     top_bullets, strict cardinality 3, role_order [safety, productivity,
     trust].
   - visual_hints.min_height_px = 320, derived from 3 circle row 80 +
     title 30 + label area 60 + intersection 30 + padding 40 = 240
     + 80 safety buffer (lighter than F14's 350 since CSS-only).
   - accepted_content_types = [text_block] only.
   - 4 sub_zones declared (circle_1/2/3 main_text + intersection emphasis).

4. scripts/smoke_frame_render.py — add bundled fixture for F12 self-check.

Verification :
- python -m py_compile src/phase_z2_mapper.py scripts/smoke_frame_render.py
  : PASS
- python scripts/smoke_frame_render.py --self-check : PASS 5/5 (F12 added
  at 3691 chars CSS-only)
- python scripts/smoke_frame_render.py construction_goals_three_circle_intersection
  --render-to data/runs/imp04_f12_visual : PASS, R3 artifact written. 0
  raster refs (CSS-only partial); copy_assets ran successfully and
  produced data/runs/imp04_f12_visual/assets/construction_goals_three_circle_intersection/
  with the frame's 4 PNG files (unused since partial is CSS-only — assets
  remain available for future raster promotion if visual inspection
  flags fidelity loss).
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_f12_regression
  : PASS (MDX 03 V4 rank-1 still F13/F29, F12 not selected — F12 only
  triggered by 02-1 / 01-1 sections per V4 evidence)

scope-lock honored : V4 logic / V4 evidence / mapper existing builders /
composition planner / Phase R' / pipeline production render path / AI/Kei
all unchanged. New builder added without modifying existing 3 (mixed
strategy per scope-lock §4).

Calibration status (matrix §4.1 Fix 7 4-class) :
- class 1 adapter readiness : new builder registered, partial loadable,
  contract valid, smoke passing.
- class 2 content-fit : compact 110×110 circles + label, watch for label
  overflow if MDX bullets exceed ~12 chars.
- class 3/4 mapping/routing : not applicable for this commit.
- Codex review mandatory per scope-lock §5 (new builder pattern
  cycle_intersect_3 first introduction).

Refs Gitea #4 (IMP-04 Track A frame 2 — V4 strongest UAI tier)
2026-05-13 11:50:44 +09:00
46e9db30b2 docs(IMP-04): adopt 3-layer architecture + 4-class failure taxonomy
Wording-only matrix clarification per Codex #15477 architecture
correction + #15485 acceptance + Claude rounds 32/34 agreement.

Two foundational changes :

1. New §0 — Architecture context (3-layer)
   - V4 = matching basis / design-selection authority
   - figma_to_html = rich source/evidence layer (visual hierarchy,
     assets, layer structure, geometry, source intent, provenance)
   - Phase Z = runtime orchestration / assembly / recovery layer
     (consumes V4 candidates + source evidence; does NOT replace V4
     as the matching authority)
   - Explicit correction: earlier "Phase Z = execution SoT" framing
     was a 2-layer dichotomy that conflated matching authority (V4)
     with runtime execution (Phase Z). 3-layer is the correct
     architecture.

2. Fix 7 in §4.1 — 4-class failure taxonomy as primary
   - Replaces F1/F2/F3 as the primary technical failure
     classification. F1/F2/F3 remain only as secondary review /
     process severity labels.
   - 4 classes (Codex #15477) :
     - class 1: adapter/runtime readiness (partial/asset/slot/
       contract missing — V4 ranking stays valid)
     - class 2: content-fit issue (overflow / light edit needed)
     - class 3: V4 ↔ figma_to_html mapping issue (metadata wrong)
     - class 4: popup/secondary content routing case
   - Prior-history reclassification documented :
     - 556b448 minimum viable persona — class 1
     - 2fcd8bb strict CSS-only refinement — class 2
     - a1c06b7 MDX02 chain dependency — class 1 (construction_goals
       catalog readiness, NOT V4 logic issue)
     - Round 26 "Phase Z = 실행 SoT" framing — wording error

No source code, runtime catalog, builder, partial, V4 evidence,
mapper, or composition planner changes. Documentation clarification
only.

History preserved : previous commits stand. This is a forward-only
clarification, not a rewrite of past commit messages.

Refs Gitea #4 (IMP-04 — architecture wording fix, 3-layer + 4-class)
2026-05-13 11:42:19 +09:00
834ed3946d test(IMP-04): add F14 render artifact check and fix min-height note
3rd commit in F14 series (calibration point clean pass). Closes the two
Codex round 26 (#15435) blockers:
1. min_height_px self-contradiction
2. F14 actual rendered visual artifact absent

Per Codex round 28 (#15447) agreement (M1 + --render-to extension) and
Claude round 27 (#15438) fix path :

Changes :

1. templates/phase_z2/catalog/frame_contracts.yaml — min_height_px 320 → 350.
   Comment now self-consistent : 70 (badge raster) + 210 (bullet body) +
   36 (photo strip) + 30 (padding) = 346 sum + 4 safety buffer = 350.
   F14 is now F29-class (345) per raster-promoted content density.

2. scripts/smoke_frame_render.py — add `--render-to DIR` dev mode (R3
   acceptance gate). Behavior :
   - StrictUndefined smoke render (unchanged)
   - reuse production `copy_assets(template_id, run_dir)` so the runtime
     asset delivery path is exercised (no logic duplication)
   - wrap partial with minimal viewer HTML (Phase Z token vars + slide-
     sized wrap, browser-openable)
   - fail-fast if rendered HTML references a missing local asset (per
     Codex round 28 §4 recommendation)
   - save artifact to {DIR}/index.html with {DIR}/assets/{template_id}/*
   - production render path (phase_z2_pipeline.render_slide) unchanged
   - small regex fix : asset extraction now captures both `src="..."`
     and `url("...")` references

F14 verification (3rd commit) :
- python -m py_compile scripts/smoke_frame_render.py : PASS
- python scripts/smoke_frame_render.py --self-check : PASS 4/4 (7446 chars
  for persona unchanged from a1c06b7)
- python scripts/smoke_frame_render.py three_persona_benefits --render-to
  data/runs/imp04_f14_visual : PASS, 10 asset refs all resolved, 14
  raster files copied via production copy_assets() to
  data/runs/imp04_f14_visual/assets/three_persona_benefits/
- R3 artifact ready for browser visual inspection at
  data/runs/imp04_f14_visual/index.html (Phase Z slide-sized wrapper +
  promoted persona partial + 10 referenced assets all on disk)

F14 clean pass status :
- min_height_px self-consistency : fixed (M1 = 350)
- Actual rendered artifact : produced and assets resolved
- Visual fidelity inspection : ready for browser/eye review
- Earlier MDX02 chain attempt (commit a1c06b7 body) : superseded;
  MDX02 is not the F14 validation baseline (Claude round 26 / Codex
  round 26 agreement). MDX03 is the matched baseline; F14 visual
  inspection now uses the harness artifact path instead.

scope-lock guardrails honored : 32-frame target, no V4 logic change,
no Phase R' regression, no mapper or composition planner change, no
production render path change. The new harness mode is dev verification
only, isolated from runtime selection.

Refs Gitea #4 (IMP-04 Track A — F14 3rd commit, clean pass gate)
2026-05-13 11:07:37 +09:00
a1c06b779a refactor(persona): F14 2nd refinement — promote raster assets (IMP-04 Track A F2 re-do)
Second calibration refinement after Codex round 22 F2 finding (commit 2fcd8bb
was over-broad CSS-only over-generalization). Approach re-locked via Codex
rounds 23/24 + Claude rounds 23/25 with per-asset case-by-case promotion
policy (round 13 §2.3 restored).

Asset decisions for F14 (Codex round 24 agreement) :

PROMOTED RASTER (Phase Z `copy_assets()` infra — pipeline.py:746 — handles
delivery from figma_to_html_agent/blocks/1171281191/assets/ to runtime
{run_dir}/assets/three_persona_benefits/) :
- col_bg_texture (1 PNG, 3 col 공유)
- bottom photos × 3 (실사 사진, CSS equivalent 불가)
- badge outer × 3 (round ring image)
- badge inner × 3 (round disk image)
→ 10 raster assets total

PROMOTED CSS (디자인 의도, CSS 충분) :
- 발주자/시공자/설계자 accent color (#285b4a / #445a2f / #743002)
- col-overlay solid tint (#d6e7c4 / #e1efe1 / #d0c0ad, opacity 0.8)
- title gradient (#000#883700)
- bullet check marker (✓ unicode)

NOT PROMOTED : 한자/장식 텍스트 (Figma deco, MDX 무관)

min_height_px : 290 → 320 (badge 70 + body 210 + photo 36 + padding 30,
F29 345 class). Codex round 13 §2.2 derive + confirm method.

Partial structure :
- 3-column grid (Phase Z flex/grid, not Figma absolute positioning)
- per column: badge (raster outer/inner + CSS text overlay) → bullet
  body (CSS check marker) → bottom photo (raster, opacity 0.7)
- col-bg texture as ::before background image, overlay tint as ::after
- isolation: isolate + z-index layering for proper raster + overlay stacking

Verification :
- python scripts/smoke_frame_render.py --self-check : PASS 4/4 (persona
  refined 7446 chars, was 5314 in commit 2fcd8bb)

V2 validation gap (Codex round 24 §3 anticipation) :
- python run_mdx03_pipeline.py --phase-z2 --mdx samples/mdx/02. DX의 시행
  목표 및 기대효과.mdx --run-id imp04_persona_v2_mdx02 : FAIL
- TypeError 'NoneType' object is not subscriptable at contract["payload"]
- Root cause : MDX 02 section 02-1 V4 rank-1 = construction_goals_three_
  circle_intersection (frame 12), not yet in catalog. Pipeline aborts at
  02-1 before reaching 02-2.2 (persona target).
- Chain dependency : MDX 02 acceptance requires construction_goals
  activation first.
- F1/F2/F3 classification of this blocker pending Codex round 26 review.

Visual rendering of F14 deferred to either:
(a) construction_goals activation first (Track A priority reorder)
(b) V3 synthetic MDX with persona-only content + V4 evidence extension
(c) V4 dev override / IMP-06 section-override mechanism

This commit progresses the asset-promoted F14 partial. F14 acceptance
gate (actual render inspection) remains open pending the V2 chain
dependency resolution.

scope-lock guardrails honored : 32-frame target, no V4 logic change, no
Phase R' regression, no MDX03/MDX02 hardcoding, no other partial/builder
modified.

Refs Gitea #4 (IMP-04 Track A F2 re-do, persona 2nd refinement)
2026-05-13 10:49:20 +09:00
2fcd8bb94a refactor(persona): refine three_persona_benefits using index.html base (IMP-04 Track A 1/16)
First Track A calibration refinement. Previous commit 556b448 wrote partial
from scratch (110 lines, minimum viable) without referencing the figma_to_html
index.html base. Per the matrix-clarification commit df9ee43 §4.1, this is the
first refinement and the agreed calibration point for the corrected work pattern.

Input :
- figma_to_html_agent/blocks/1171281191/index.html (184 lines, MCP Figma
  Desktop Dev Mode 2026-04-16, 텍스트 노드 전수 반영)
- figma_to_html_agent/blocks/1171281191/analysis.md (slot 정의 + suits/not_suits)
- figma_to_html_agent/blocks/1171281191/flat.md (좌표 + 색 + typography 실측)
- figma_to_html_agent/blocks/1171281191/texts.md (텍스트 전수)

Visual provenance applied :
- PROMOTED : 발주자/시공자/설계자 accent color (#285b4a / #445a2f / #743002),
  overlay tint (#d6e7c4 / #e1efe1 / #d0c0ad — 0.5 → 0.15 vertical fade),
  title gradient (#000#883700), card 외곽 color border + radius,
  badge round 의도, bullet check 의도, section divider 의 색 위계
- NOT PROMOTED : col_bg_texture.png, col-overlay raster, 하단 사진 3 개,
  원형 뱃지 outer/inner image, 체크 아이콘 image — Phase Z 기존 F13/F29/F16
  strict CSS-only convention 답습 (memory rule feedback_blocks_must_be_css.md)
- ADAPTED : Figma 65/50/40px → token-fixed (zone-title / sub-title / caption /
  body), 396×397 absolute round badge → flex card-header CSS round 의도, Figma
  zoom 0.49213 absolute positioning → Phase Z flex/grid zone-fit, 7 bullets
  absolute layout → flex column auto spacing

min_height_px derivation (Codex round 13 §2.2 — derive + confirm) :
- Figma frame 1927 px @ scale 0.49213 → 948 px adapted full frame
- Phase Z slide-body ≤ 585 px → adaptive content fit
- Content density (3 col × 7 bullets + badge) → F29 (345) class 보다 가벼움
- Derived = 290 (between F13=230 and F29=345). updated from 280 estimate.
- confirm via smoke + sample run (current commit)

Changes :
- templates/phase_z2/families/three_persona_benefits.html : rewrite (110 → 175
  lines). per-persona soft background tint (overlay color), CSS round badge
  with name + "목표" sub, CSS ::before check marker, full provenance comment
  block (PROMOTED / NOT PROMOTED / ADAPTED / min_height derivation).
- templates/phase_z2/catalog/frame_contracts.yaml : min_height_px 280 → 290
  with derivation comment.

Verification :
- python scripts/smoke_frame_render.py --self-check : PASS 4/4 (existing 3 +
  persona refined 5314 chars, was 3889 — visual richer)
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_persona_refinement :
  PASS (MDX 03 V4 rank-1 still F13/F29, persona refinement does not affect
  existing 03-1/03-2 selection)

Calibration outcome : ready for first-refinement Codex review (per scope-lock
#5, first refinement = mandatory Codex review). Pending F1/F2/F3 escalation
decision based on review result.

Refs Gitea #4 (IMP-04 Track A — first calibration refinement, persona)
2026-05-13 10:32:24 +09:00
df9ee43d09 docs(IMP-04): re-apply matrix clarifications after revert
Re-apply the W1 wording clarifications previously agreed in the comment
thread. The originally executed wording commit `6d33884` was reverted by
Codex via `c807b2c` after Codex acknowledged that `ㄱ` for both Claude and
Codex is comment-only review (no source/doc edit). Both sides 100%
agreement is restored via Claude rounds 16/17/19 and Codex rounds 15/18.
This Claude-applied commit is the agreed re-application path (option A).

Six fixes applied to docs/architecture/IMP-04-FRAME-SUITABILITY-MATRIX.md :

1. §2 ACTIVE 4 frames table : add resource status (A/T/I/F/S) column.
   F13 has no `assets/` directory (marked `-`). State that ACTIVE means
   catalog-registered / runtime-active, not necessarily A+T+I+F+S
   resource-complete.

2. §4 Track B : strengthen wording. Track B = visual-resource-pending
   inside the 32-frame scope, **NOT exclusion / discard / scope
   reduction**. Visual-resource acquisition timing is the only difference.

3. §4 Track B option (b) : minimal CSS partial from analysis/texts only
   is **main path X, explicit temporary placeholder only**. Avoids the
   frame 1 (`three_persona_benefits` 556b448) quality failure pattern.

4. §4.1 Track A priority : **execution ordering only, NOT scope filter**.
   All 16 reusable-now frames remain activation targets. V4-weak 11
   frames stay in scope. Builder family grouping = secondary ordering
   allowed after first refinement calibration.

5. §4.1 Codex review granularity explicit : first refinement, new builder
   pattern, ambiguous mapping, shared catalog/builder logic = Codex
   review mandatory. Low-risk repeated frames may be grouped only after
   pattern is proven.

6. §4.1 calibration failure modes F1/F2/F3 (Claude round 14 catch + Codex
   round 15 (a) accepted) :
   - F1 small styling/wording issue -> same-frame follow-up commit +
     Codex re-review.
   - F2 approach-level problem -> pause Track A, approach re-lock round,
     retry refinement.
   - F3 scope/resource problem -> reopen scope/resource axis, possibly
     IMP-04b, block bulk activation until resolved.

History trace : `fe766f1` (matrix base) -> `6d33884` (Codex W1 execute,
wrong workflow) -> `c807b2c` (Codex revert + workflow lock symmetric)
-> this commit (Claude re-apply under user execution signal, option A).
History noise retained as honest trace of the corrected ㄱ definition.

No source code changes. Documentation clarification only.

Refs Gitea #4 (IMP-04 — matrix wording re-application post-revert)
2026-05-13 10:21:52 +09:00
c807b2c56a Revert "docs(IMP-04): clarify matrix tracks and review gates"
This reverts commit 6d338846b2.
2026-05-13 10:09:30 +09:00
6d338846b2 docs(IMP-04): clarify matrix tracks and review gates
- Add active-frame resource status and clarify catalog-active versus resource-complete.\n- Clarify Track B as visual-resource-pending inside the 32-frame scope, not exclusion.\n- Clarify Track A priority as execution order, not scope filter.\n- Add Codex review granularity and calibration failure modes for the first refinement.\n- Mark minimal CSS from analysis/texts as temporary placeholder only.
2026-05-13 10:07:41 +09:00
fe766f13d5 docs(IMP-04): 32-frame schema suitability matrix (Gitea #4)
Codex #15337 + #15340 의 schema comparison 추천 답 — 32 V4 frames 의
figma_to_html 자원 inventory + Phase Z runtime catalog mapping proposal.

- §1 요약 통계 : analysis/texts 32/32, index.html 20/32 (12 missing)
- §2 ACTIVE 4 frames (F13/F29/F16 + three_persona_benefits)
- §3 Remaining 28 분류
  - §3.1 reusable-now (16) : index.html 보유 frames
  - §3.2 visual-pending (12) : index.html 부재 frames
- §4 Track 분리 (A: visual activation / B: visual-pending / C: matching schema canonical decision IMP-05+ 이양)
- §5 Builder 재사용 vs 새 builder 분석
- §6 min_height_px derivation method (flat.md scale)
- §7 Resource completeness summary
- §8 다음 단계 user 확인 사항

본 doc 은 IMP-04 impl 전 prerequisite. impl 시 per-frame Step 1
(V4/Figma alignment + uniqueness check) 의 input.

scope :
- Phase Z runtime catalog (executable projection) 으로의 mapping 만
- matching schema canonical decision (Codex #15340) = 별 axis 이양
- visual-pending 12 frames = Track B 옵션 (a/b/c) user 합의 후 진행

Refs Gitea #4 (IMP-04 A-2 Catalog 확장 — schema suitability matrix)
2026-05-13 09:36:22 +09:00
556b4486ae feat(catalog): activate three_persona_benefits frame (IMP-04 #4 / 1 of 7)
Reason : V4 use_as_is=1 (frame_number=14, frame_id=1171281191).
Pattern : cards-3col-persona — 발주자/시공자/설계자 3 주체 각 benefit.

- Append `three_persona_benefits` contract to frame_contracts.yaml after
  the existing F13/F29/F16 entries (Codex Catch 1/4: YAML order = trace
  selection surface)
- Reuse existing builder primitives: items_with_role + quadrant_item
  parser. No new entry in PAYLOAD_BUILDERS / ITEM_PARSERS.
  Output dict shape: payload.personas = [{label, body, color_class}, ...]
- Add families/three_persona_benefits.html partial:
  - Pure CSS (no Figma raster img tags) per memory rule
    `feedback_blocks_must_be_css.md`
  - PROMOTED colors per persona (#285b4a client / #445a2f constructor /
    #743002 designer) from Figma TEXT layers
  - NOT PROMOTED: col_bg_texture / overlay / 하단 사진 / 원형 뱃지 inner-outer
    image — all replaced by CSS approximation (pill badge + colored
    border + check-style text-line bullets)
  - Token-fixed typography (zone-title / sub-title / caption / body)
  - data-frame-id="1171281191" data-template-id attributes
- Add bundled smoke fixture for three_persona_benefits to
  scripts/smoke_frame_render.py
- visual_hints.min_height_px = 280 (initial estimate between F13=230 and
  F29=345 for 3-card text-heavy layout). Refine during batch full
  pipeline if needed.
- accepted_content_types = [text_block] only (rich types not routed yet
  per IMP-03 scope-lock).

Verification :
- isolated Jinja StrictUndefined smoke (scripts/smoke_frame_render.py
  --self-check) : PASS=4/4 (existing 3 + new persona, 3889 chars)
- regression run on MDX 03 (env OFF + rich OFF) : PASS — MDX 03 V4
  rank-1 still F13/F29 so the new entry does not affect existing flow

scope-lock 15 conditions all honored (no V4 / mapper / Phase R' / Step
6+ changes; per-frame 6-step gate complete; YAML order preserved).

Refs Gitea #4 (IMP-04 A-2 Catalog 확장)
2026-05-13 06:56:35 +09:00
2717a0a3a6 feat(infra): per-frame Jinja smoke harness with StrictUndefined (IMP-04 #4)
- Add scripts/smoke_frame_render.py for IMP-04 scope-lock §11+§13:
  isolated StrictUndefined Jinja partial render gate, separated from
  production render_slide() permissive behavior
- CLI: --self-check runs every bundled fixture; positional template_id
  takes payload via --payload <json> / stdin / fixture
- Bundled mock payloads for the 3 existing active frames match real
  builder output shape; all 3 partials PASS self-check
- New frame activation gate (per-frame 6-step Step 5): partial must
  pass smoke render with a complete mock that mirrors the builder's
  output dict (optional fields supplied as empty/falsy so {% if %}
  guards still work under StrictUndefined)
- Exit codes: 0=all pass, 1=at least one fail, 2=invalid input

Latent finding (out of IMP-04 scope, surfaced for the record):
  bim_issues_quadrant_four partial references slot_payload.quadrant_N_headline,
  but _build_quadrant_flat_slots() only produces quadrant_N_label and
  quadrant_N_body. The headline div therefore never renders in production.
  Either dead reference or a builder extension that was never landed —
  reconcile in a follow-up axis, not in IMP-04 catalog expansion.

production render path (phase_z2_pipeline.render_slide) unchanged.

Refs Gitea #4 (IMP-04 A-2 Catalog 확장 — infra commit)
2026-05-13 06:48:19 +09:00
fc3f7d8826 feat(step2+step3): slide-level rich ContentObject trace (IMP-03 #3)
- Add extract_rich_content_objects(normalized_assets, mdx_id) in
  phase_z2_content_extractor.py emitting slide-level rich ContentObjects
  for SPEC v1 §1.2 types: details (popups), image, table
- Extend ContentObject dataclass with optional scope/mdx_id/section_id
  metadata fields (additive, default None — v0 unchanged)
- _stage0_chained_adapter() returns 5-tuple adding normalized_assets
  ({popups, images, tables}); empty on env=OFF / hard fallback
- Step 2 artifact gains additive stage0_normalized_assets nested field
  (env=OFF / fallback → empty lists). Existing 7 fields preserved.
- Step 3 emits root-level rich_content_objects once at slide scope
  with rich_content_objects_enabled / scope / source / disabled_reason /
  skips / invariant_warnings. per_zone list still references v0 only.
- PHASE_Z_STEP3_RICH_OBJECTS_ENABLED env flag, default OFF (canary,
  matches PHASE_Z_STAGE0_ADAPTER_ENABLED / PHASE_Z_B4_*). Enable
  requires flag=1 AND non-empty normalized_assets; otherwise records
  disabled_reason = FLAG_OFF or NO_NORMALIZED_ASSETS.
- transform_table dedup: arrow glyph detection in normalized table
  rows/headers → skip with reason=skipped_transform_table_duplicate.
  v0 _capture_3col_transform_table remains the sole transform_table
  source; generic table only for non-transform tables.
- ID pattern {mdx_id}.{details,image,table}-N (slide-level namespace).
- plan_placement() input unchanged (v0 content_objects only) — rich
  list never feeds placement/region planning in this issue.
- self-test extended with 5 rich extractor cases (popup/image/table
  /arrow-skip/empty); v0 self-test unchanged and still PASS.
- mapper / V4 / composition / Step 6+ / AI/Kei / pipeline_path_connected
  unchanged. trace fidelity only.

env OFF + rich OFF: legacy PASS, no regression
env OFF + rich=1   : disabled_reason=NO_NORMALIZED_ASSETS, rich list empty
env=1   + rich=1   : Step 2 stage0_normalized_assets populated (1 table on
                     MDX 03, invariant match adapter_counts). Step 3 write
                     blocked by inherited IMP-02 composition_planner abort
                     (downstream gap, not IMP-03 scope).

Refs Gitea #3 (IMP-03 A-1 popup/image/table trace)
2026-05-13 01:18:25 +09:00
bac13c09c4 feat(step2): chained adapter for Stage 0 normalize (IMP-02 #2)
- Add _stage0_chained_adapter() helper near parse_mdx() chaining
  mdx_normalizer.normalize_mdx_content + section_parser.extract_major_sections
  + section_parser.extract_conclusion_text → reconstructed MdxSection list
- PHASE_Z_STAGE0_ADAPTER_ENABLED env flag, default OFF (canary, matches
  PHASE_Z_B4_SOURCE_SHAPE_ENABLED / PHASE_Z_B4_GATEKEEPER pattern)
- Section ID reconstruction priority: raw_heading (pre-scan raw MDX
  `## N. Title` heading → title→num map lookup) → raw_heading_inline
  → order_fallback. All paths logged in id_reconstruction_log
- 5 hard fallback enums: ADAPTER_EXCEPTION / NO_USABLE_SECTIONS /
  MISSING_INVALID_IDS / DUPLICATE_IDS / NON_POSITIVE_SECTION_NUM
- Additive step02_normalized.json field stage0_adapter_diagnostics
  (enabled / used / fallback_reason / id_reconstruction_log /
  adapter_counts / diff_vs_legacy / legacy_counts)
- Preserve Step 2 existing 7 fields (slide_title / slide_footer /
  sections_count / sections / orphans / details) — additive only
- Defer mdx_normalizer / section_parser imports so legacy default-OFF
  path does not depend on those modules
- V4 / align_sections_to_v4_granularity / composition / AI/Kei /
  frame selection / status semantics unchanged

env OFF: legacy path PASS on MDX 03, no regression
env=1 : adapter path activates, IDs 03-1/03-2, raw_heading reuse
        triggered, downstream composition_planner abort surfaces
        as canary finding (out of scope for IMP-02)

Refs Gitea #2 (IMP-02 A-1 Stage 0 normalize chained adapter)
2026-05-13 00:22:57 +09:00
1dc81e0692 feat(step14+step21): add zone_geometries_px artifact (IMP-01 #1)
- Add slide-relative bbox export of .zone elements via getBoundingClientRect
- Inline Selenium JS collects zone_geometries_px = [{position, template_id, x, y, w, h}]
- write_debug_json adds top-level additive zone_geometries_px field
- Existing visual_runtime_check / zones / frame_slot_metrics / PASS/FAIL logic unchanged
- AI/Kei/V4/frame selection paths not touched

Refs Gitea #1 (IMP-01 A-6 Zone DOM 좌표 export)
2026-05-12 22:20:30 +09:00
6f1b1d9fa3 docs: add Phase Z implementation issue backlog
- Add docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md
  as implementation issue inventory (28 issues + frontend pending)
  bridged from PHASE-Q-INSIGHT-TO-22STEP-MAP.md
- Sections: §1 22-step map (11) / §2 separate axis registry (9)
  / §3 audit §1 mapping correction (5) / §4 cleanup (3) /
  §5 frontend matching source pending
- Includes review loop workflow (Codex+Claude review thread) +
  8 labels + dependency convention (none/hard link/soft link)
- Register the new doc in PHASE-Z-ROADMAP.md §8
2026-05-12 17:03:13 +09:00
783f8ca1ec docs: add Phase Q insight to 22-step map
- Add docs/architecture/PHASE-Q-INSIGHT-TO-22STEP-MAP.md as
  implementation prereq lock (audit + frontend matching insight
  → 22-step pipeline mapping + Archive guardrail)
- Sections: §0 Purpose/Boundary (9 Archive markers) /
  §1 SoT Read Result / §2 22-step status & improvement map
  (23 rows × 7 columns, Block A/B/C subsections) /
  §3 Separate Axis Registry (9 axes) /
  §4 audit §1 Mapping Correction Candidates (5 catches) /
  §5 Cleanup Candidates (3) /
  §6 Frontend Matching Insight — Source Pending
- Register the new doc in PHASE-Z-ROADMAP.md §8 (frontend
  matching insight marked as source pending)
2026-05-12 15:40:14 +09:00
8fe16e9c04 docs: reorder Phase Q audit roadmap priorities
- Replace §4 placeholder with grouped priority table (↑ / 중 / ↓ / 별 axis)
- Add §4 verification guardrail (no MDX / frame hardcoding)
- Add A-2 / A-5 risk notes (catalog frame change allowed, fallback status semantics)
- Update PHASE-Z-ROADMAP.md §5 inline with audit-derived priorities
- Add §7-B mini summary table for 12 lens items and Step 16/17 retry axis
2026-05-12 14:03:55 +09:00
c7abf61ef6 docs: write Phase Q audit salvage plan
- Summarize §2.1~§2.11 audit into 8 Salvage Candidate bundles
- Fill §3-A lens table with A-1 through D-2 salvage/new-build decisions
- Add §3-B deterministic Step 16/17 retry refinement axis
- Keep Archive exclusions and detailed dual-write criteria out of §3 scope
- Add §5-1 dated entry for 2026-05-12

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 13:24:27 +09:00
b172c1b9f4 docs: add pipeline audit for legacy execution flow
- Classify pipeline.py as Archive-heavy with Salvage Candidate 0
- Record Phase Q/R'/T execution flow as outside Phase Z normal path
- Mark deterministic pipeline utilities as Reference Only
- Mark pipeline_context.py schema and lifecycle methods as Reference Only
- Surface §1 B-1 as indirect surface, not direct composition planner
- Add §5-1 dated entry for 2026-05-12

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:28:38 +09:00
8b88757ade docs: add block_reference / selector audit (Reference Only + Archive)
- Classify §2.10 as Mixed with Salvage Candidate 0
- Mark utilities / matching helpers / Phase Q-2 filtering as Reference Only
- Record block_reference high-level entries as Phase R' reference path Archive
- Record block_selector format_candidates_for_prompt as Kei prompt formatter Archive
- Surface §1 A-2 indirect, catalog duplication, block_selector legacy as separate axes
- Add §5-1 dated entry for 2026-05-12

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:11:31 +09:00
a0e4eda0ab docs: add html_generator audit as Phase R' Archive core
- Classify html_generator.py as Archive-heavy with Salvage Candidate 0
- Record AI HTML generation path as Phase R' Archive Candidate
- Mark deterministic duplicate helpers as Reference Only
- Surface A-3/A-4 mapping mismatch as a factual note
- Add §5-1 dated entry for 2026-05-12

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 11:30:43 +09:00
79cab1dcb9 docs: add renderer audit (Reference Only + Phase R' Archive)
- Classify renderer.py as Mixed with Salvage Candidate 0
- Mark Jinja/catalog/template rendering helpers as Reference Only
- Record render_slide_from_html Phase R' path as Archive Candidate
- Clarify A-3 as indirect preview render surface
- Clarify A-4 as slide-base impact surface without conditional CSS implementation
- Add §5-1 dated entry for 2026-05-12

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 09:56:45 +09:00
1fedd4d0a0 docs: add content_verifier audit (Mixed Reference Only + Archive)
- Classify content_verifier.py as Mixed (Reference Only + Archive Candidate)
- Mark deterministic utilities (text extraction, Korean normalization, verification logic) as Reference Only — Phase Z normal path direct slot absent
- Mark Kei artifact detection (verify_no_forbidden_content + FORBIDDEN_KEI_MEMOS) and Kei AI generation retry loop (generate_with_retry) as Archive Candidate
- Clarify L4 Selenium / L5 Opus vision are header documentation only (no implementation in this file)
- Record no §3 Salvage application target (Salvage Candidate 0)
- Surface §1 B-2 mapping as indirect; H1-H3 reference axis candidates, H4-H5 Archive markers, H6 L4/L5 factual note
- Add §5-1 dated entry for 2026-05-12

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 08:51:20 +09:00
02f727f04e docs: add content_editor audit as Archive Candidate
- Classify content_editor.py as Archive Candidate at module level
- Document Kei AI direct slot-fill flow (fill_content / fill_candidates / EDITOR_PROMPT)
- Mark Kei API infrastructure (_call_kei_editor_with_retry / _parse_json) as outside Phase Z normal path
- Record no §3 Salvage Plan target for this module
- Surface §1 B-1/B-2 candidate-file mapping mismatch and AI repair fallback infrastructure as separate axes
- Add §5-1 dated entry for 2026-05-12

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 08:29:33 +09:00
bf55a53633 docs: lock Phase Q audit pass 2 boundaries
- Add §0-B Audit scope lock and strengthen §0-0 invariants
- Reclassify §2.5 F-3 deterministic budget assets as Reference Only
- Remove invalid AI/Kei revival rows from §2.2/§2.4/§2.5 lens tables
- Normalize §3/§4 legacy wording from Migrate/Delete vocabulary
- Add §5-1 reclassification tags and factual drift update
- Add pass 2 execution tracker document

Verified with 13-pattern context-aware grep:
positive misuse 0 within PHASE-Q-AUDIT.md pass 2 scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 11:55:51 +09:00
3b6d86a73c docs: start Phase Q audit and lock salvage policy
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 18:06:15 +09:00
b56fd20ae5 feat: add Phase Z override CLI and trace support
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 18:06:06 +09:00
0a9327c50c PHASE-Z-ROADMAP refactor — Codex 검토 안 + Step 22 정정
§1 상단에 lock phrase blockquote 추가:
  "현재 당장 할 일은 개발 진행이 아니라, 보고와 피드백을 위한
   PROCESS_OVERVIEW.html 프로토타입을 먼저 만드는 것이다."

§2 — 토픽별 6 영역 → axis 명 list (Step 5 보완 / 6-A / 7-conn /
     8-conn / Step 9 v0 / cleanup-1 / F29 / README / push 완료).
     CHANGE-LOG reference 로 추적성 확보.
§3 — Step 22 추정 % 20% → 10% (UI 미시작 정합).
     caveat 강화 (STATUS-BOARD 가 single source of truth 명시).
§4 — 큰 로드맵 7 단계 한 블록.
§5 — 우선순위 3 줄 분리 (1. 프로토타입 / 2. 보고 / 3. 복귀).
§6 — 보고용 프로토타입 계획 (포함 내용 / 목적) 별도 섹션.
§7 — Pipeline 복귀 후 Todo (MDX04 / 시각 점검 확장 / 어댑터 /
     MDX 정규화 / Step 21 / MDX01 02 검증) 별도 섹션.
§8 — 문서 역할 분담 표 (README / OVERVIEW / STATUS-BOARD /
     CHANGE-LOG / ROADMAP / PROCESS_OVERVIEW 6 문서).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 10:31:13 +09:00
473de6b3d0 PHASE-Z-ROADMAP.md 신설 — 진행 계획 + 세부 todo
문서 역할 분담:
- README        : 프로젝트 개요 + 큰 그림 (가끔 갱신)
- OVERVIEW      : 22 단계 도면 (구조 잠금)
- STATUS-BOARD  : 각 단계 정확한 상태 (자주 갱신)
- CHANGE-LOG    : 결정 변경 이력
- ROADMAP (신규): 진행 계획 + 당장 할 일 + 세부 todo (자주 갱신)

내용:
1. 현재 위치 (MDX03 정상 경로 통과)
2. 지금까지 완료한 작업 6 가지 영역
3. 22 단계 진행 수준 (추정 % 표 + STATUS-BOARD 단일 출처 caveat)
4. 큰 로드맵 7 단계
5. 세부 todo (5.1 보고용 프로토타입 우선 / 5.2~5.8 단계별)
6. 당장 실행 순서 (보고용 프로토타입 → 22 단계 정리 복귀)
7. 문서 역할 분담 표

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 10:25:59 +09:00
995101dadd README 통합 갱신: 한글 / 22-step Mermaid / 로드맵 Mermaid
- 1. 프로젝트 개요 + 핵심 용어 표 (MDX / V4 / Phase Z / Frame / Region / Slot)
- 2. 22 단계 파이프라인 — 각 단계 별도 박스, 한글 라벨, 결정 분기 포함
- 3. 현재 완료 수준 — MDX03 정상 경로 통과, 진행 약 65~70%
- 4. 향후 로드맵 — 7 단계 (한글 LR Mermaid + 단계별 상세)
- 5. 운영 원칙 — 절대 원칙 / V4 ↔ Phase Z 책임 / 렌더 정책

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 10:19:58 +09:00
85c680f02a docs + V4 catalog + samples + Phase Q legacy 보존
전체 26 files (20 추가 + 6 수정), 10507 insertions.

Phase Z 문서 :
- docs/architecture/PHASE-Z-CHANGE-LOG.md (신설) — axis-by-axis 의사결정 history
  (newest-on-top). Step 7-A 부터 6 entry 박힘 + 2026-05-08 / 2026-05-08 #2
  (compat 매트릭스 폐기 / 6-B 폐기 / F14 표현 정정 / label gate policy 분리).
- docs/architecture/PHASE-Z-PIPELINE-OVERVIEW.md (수정) — Step 5/6/9 Gap note
  append (구조 무변, append-only). 6-B 폐기 사실 + Refinement F.
- docs/architecture/PHASE-Z-PIPELINE-STATUS-BOARD.md (수정) — snapshot date
  2026-05-08 갱신. §3 핵심 missing item 5 (Step 5/6/9 boundary axis breakdown
  + 폐기 기록). §6 한 줄 갱신 — 다음 axis 후보 A~F.

Project root docs :
- PLAN.md / PROGRESS.md / README.md (수정) — 토큰 체계 / 폴더 구조 / 설계 문서 /
  역할 분리 반영.
- IMPROVEMENT-REDESIGN.md (신설) — Phase Z 설계 핵심 문서.
- PROCESS_OVERVIEW.html (신설) — 파이프라인 개요 시각.
- docs/tasks/* (신설) — Phase Z task 문서.

V4 catalog (Phase Z runtime 필수 의존성) :
- tests/matching/v4_full32_result.yaml (신설, 4888 줄) — V4 매칭 결과 32 frame
  × 10 MDX section. lookup_v4_match() / lookup_v4_candidates() 가 본 파일 read.
  Phase Z runtime 이 *없으면 즉시 abort* — clone 후 즉시 동작 가능 보장.

Samples :
- samples/mdx_batch/04.mdx (신설) — MDX04 기본 sample.
- samples/mdx/04. DX 지연 요인.mdx (신설) — MDX04 원본.

Phase Q legacy 보존 (별 axis "Phase Q audit & salvage" 영역) :
- src/block_matcher_tfidf.py / catalog_blocks.py / frame_extractor.py /
  pipeline_v2.py — Phase Q (옛 파이프라인) src 신규 untracked 파일들.
  Phase Z runtime 와 의존성 0. Phase Q audit axis 에서 검토 예정.
- scripts/eval_block_matcher.py / fetch_all_frame_screenshots.py /
  match_17_units_my_matcher.py / match_mdx_strict.py / match_mdx_to_frames_tfidf.py /
  ocr_augment_texts.py / run_pipeline_v2.py / previews/ — Phase Q 작업 시
  사용한 옛 script. 같이 보존.
- run_mdx03_pipeline.py (수정) — Phase Q 진입점 (no flag) + Phase Z 진입점
  (--phase-z2 flag) 동시 wrapper. Phase Z 만 사용 시 `python -m
  src.phase_z2_pipeline samples/mdx_batch/03.mdx <run_id>` 직접 호출.

비-scope :
- tests/matching/ (v4_full32_result.yaml 외 ~63MB) — V4 진화 history /
  reports / DECK / ATTACH. Phase Q audit axis 에서 검토.
- tests/pipeline/ (~15MB) — pipeline data. Phase Q audit 영역.
- templates/catalog/blocks.yaml — 옛 block catalog. Phase Q audit.
- templates/phase_z2/frames/ — 옛 frame partial 위치. Phase Q audit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:47:58 +09:00
ec83405770 phase z pipeline: Step 5 / 6-A / 7-conn / 8-conn / Step 9 v0 axis 박힘
사용자 lock 2026-05-08 — Step 5/6/9 boundary reframe.
V4 가 frame 선택, Step 6 은 V4 rank-1 default 전사, Step 9 는 application_plan
번역. compat 매트릭스 안 폐기.

src/phase_z2_pipeline.py 변경 :
- lookup_v4_candidates(v4, section_id, max_n=6) 추가 — V4 non-reject max-6
  후보 list. raw 32 entry 는 v4_full32_result.yaml 영속, step05 = 정제 list.
  lookup_v4_match() (rank-1) 유지 — Step 6 backward compat. (Step 5 보완)
- step05_v4_evidence.json schema 확장 — evidence_per_section[i] =
  {section_id, v4_candidates: [...], candidate_status: "ok" |
  "no_non_reject_v4_candidate"}. (Step 5 보완)
- candidates_lookup_fn 정의 + plan_composition() 에 주입.
  V4 raw dict 는 composition module 안 봄 — fn injection. (Step 6-A)
- Step 6 artifact 의 selected_units[i] 에 v4_candidates 필드 추가. (Step 6-A)
- step07_layout.json data 에 unit_count + layout_candidates 필드 추가
  (Step 7-B 의 select_layout_candidates 결과). step07_selected_layout.html
  에 Layout Candidates 섹션 추가 (default / alternative / selected badge).
  (Step 7-conn)
- step08_zone_region_ratios.json 의 per_zone_plan[i] 에 region_layout_candidates
  + display_strategy_candidates 필드 추가 (Step 8-B-1/2 후보 함수 호출).
  step8_conn_placeholder_signals 명시 — Step 3/4 부재 종속 placeholder
  (region_count=1, content_type="text_block"). step08 HTML 에 candidates pill +
  placeholder caveat. (Step 8-conn)
- APPLICATION_MODE_BY_V4_LABEL 상수 추가 — V4 label → application_mode 변환.
- Step 9 v0 artifact block 신설 (~180 줄) — step09_application_plan.json +
  .html. unit 별 layout_candidates / region_layout_candidates /
  display_strategy_candidates / v4_candidates / candidate_status /
  application_status / current_default_candidate / application_candidates 박힘.
  invariant 5 가지 자연 만족 (status.md §4). (Step 9 v0)

src/phase_z2_composition.py 변경 :
- CompositionUnit 에 v4_candidates: list field 추가 (additive, logic 무변).
  duck typed (V4Match-shape) — circular import 회피. (Step 6-A)
- collect_candidates() 에 v4_candidates_lookup_fn 인자 추가. 3 분기
  (single / parent_merged / parent_merged_inferred) 에서 v4_candidates 채움.
  (Step 6-A)
- plan_composition() 도 v4_candidates_lookup_fn pass-through. (Step 6-A)
- stale "pipeline 호출처 X" 주석 정정 (3 곳: select_layout_candidates /
  select_region_layout_candidates / select_display_strategy_candidates +
  catalog header 2 곳). Step 7-conn / 8-conn 으로 호출처 박혀 *호출처 X* 사실
  위배. (cleanup-1)

axis 닫힘 : Step 5 보완 + 6-A + 7-conn + 8-conn + Step 9 v0 + cleanup-1.
폐기 : 6-B (frame ownership transfer — misframed axis. PHASE-Z-CHANGE-LOG.md
2026-05-08 #2 entry 참조).

regression 0 : MDX03 fresh run 검증 — final.html / step10/12/13/20 byte-동일.
schema 확장만 (step05/06/07/08/09).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:47:11 +09:00
8e1f5c67c1 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>
2026-05-08 09:43:18 +09:00
f66497cf8d phase z slide_base + token CSS + families 갱신 (5-layer + F29 fix)
- templates/phase_z2/slide_base.html — geometry 재정상화:
  divider top 58 / height 2 / #cbd5e1
  body top 76 / height 585 / left 50 / width calc(100%-100px)
  footer left 50 / bottom 8 / height 41 / width calc(100%-100px)
  (사용자 lock 2026-05-07 — front 정합)
- templates/styles/tokens/{spacing,typography}.css — 5-layer 위계 lock 반영:
  spacing : --slide-divider-top 58 / --slide-body-top 76 / --slide-body-height 585 /
            --slide-footer-bottom 8 (slide_base.html 와 1:1)
  typography : --font-zone-title 16px (대) / --font-sub-title 12px (소) /
               --font-body 10px (콘텐츠) — 5-layer (대/중/소/부소/콘텐츠)
- templates/phase_z2/families/three_parallel_requirements.html — F13 partial:
  cleanup-1 (2026-05-08) stale 주석 정정 (Legacy templates/blocks/structures/
  prerequisites-3col.html reference 제거 — 해당 legacy 폴더 삭제 후 broken).
- templates/phase_z2/families/process_product_two_way.html — F29 partial:
  visual fidelity bug fix (2026-05-08).
  missing SVG asset 3 개 (header_left_bg, header_right_bg, body_bg) 참조 제거 →
  figma origin (figma_to_html_agent/blocks/1171281210/index.html) 의 R8 룰
  ("순수 CSS 우선") 따라 linear-gradient + border-radius pill 로 재현.
  PROMOTED 줄도 갱신 (banner-left/right bg gradient + body bg 2-half gradient).

regression 0 (MDX03 fresh run 검증 — final.html PASS, missing image 0).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:41:40 +09:00
2b56a4c979 config: .gitignore + .mcp.json + .claude/settings.json 갱신
- .gitignore : forex/ 추가 (session workspace, 작업 흐름 trace, push X 사용자 결정 2026-05-08).
- .mcp.json : figma-desktop MCP endpoint sse → http (localhost:3845/mcp).
- .claude/settings.json : 권한 list 갱신 (200+ 새 entry).
  GitHub PAT 가 박혀 있던 5 줄 *제거* (curl Authorization Bearer 줄)
  — Bash 권한 history 잔여, 인증 token 으로 사용 X.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:41:19 +09:00
9fbe3ac90c add: figma_to_html_agent/blocks/ + 변환 도구 docs 갱신
전체 401 files (397 추가 + 4 수정), 14304 insertions.

추가:
- figma_to_html_agent/blocks/ — Figma 변환 결과 (32 frame, ~79MB).
  각 frame folder = {analysis.md, flat.md, texts.md, index.html, assets/,
  _renders/, _render.py, RELATIONSHIPS.md / STATUS.md / classification.md
  (일부 frame)}.
  Phase Z 의 *figma source layer* — runtime 에서 직접 사용 X, contract /
  partial / builder adapter (미래 axis A) 의 source.
- figma_to_html_agent/DISCUSSION-SUMMARY-20260411.md — 변환 설계 회의 기록.
- figma_to_html_agent/HARNESS.md — 변환 검증 harness.
- figma_to_html_agent/scripts/fetch_figma_screenshots.py — Figma 스크린샷 자동 수집.

수정:
- figma_to_html_agent/PROCESS-CONTROL.md / PROCESS.md / RULES.md —
  변환 프로세스 / 룰 갱신 (R8/R9 lock 강화 등).
- figma_to_html_agent/blocks_index.md — 32 frame 인덱스 갱신.

Phase Z 영향 0 (figma_to_html_agent/blocks/ 가 V4 catalog +
templates/phase_z2/families adapter 의 source — runtime 에서 직접 import X).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:41:05 +09:00
cc2f434000 cleanup: legacy templates/blocks + figma_to_html_agent block-tests / 옛 docs 정리
전체 561 files, 32464 deletions. Phase Z runtime 의존성 0 — 모두 옛 작업 흔적.

대상:
- templates/blocks/ (104) — 옛 design_agent block library (BEPs, cards, structures,
  emphasis, headers, media, svg, visuals, tables 등). Phase Z 가 templates/phase_z2/
  로 이전 후 outdated.
- templates/catalog.yaml — 위 block library 의 catalog (의존성과 같이 폐기).
- figma_to_html_agent/block-tests/ (301) — figma 옛 변환 시도들 (renders, assets,
  html, png, json, txt, md). 새 figma_to_html_agent/blocks/ 가 대체.
- figma_to_html_agent/templates_staging/ (49) — 옛 staging 시도.
- figma_to_html_agent/figma-{assets,screenshots,analysis,_ref}/ — 옛 figma 자료.
- figma_to_html_agent/previews/ (3) — 옛 preview.
- figma_to_html_agent/{FIGMA-*.md, PLAN.md, RESEARCH.md, PHASE-FIGMA-BLOCKS.md} (7)
  — outdated docs (figma 통합 axis 가 끝난 후 polluting).
- figma_to_html_agent/{block_index.faiss, block_metadata.json, figma_*.json} (6)
  — 옛 FAISS index + metadata.

Phase Z runtime / V4 catalog 영향 0 (의존성 grep 으로 사전 검증).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:39:36 +09:00
7762f6766a Lock Phase Z overlay schema for Option E migration
- categorize F13/F29/F16 frame_contracts fields as overlay-only, templates_v1-derived, or validation duplicate
- lock duplicate hard-error, 1:1 keyspace, manual trigger, semantic-identical rollback
- defer analysis.md direction inversion and 32-frame audit as separate axes
2026-05-07 11:19:52 +09:00
761a43da5e Add Phase Z B4 source-shape-aware placement
- enable B1/B2/B4 source-shape-aware F13 placement behind env flag
- align F13 placement_trace with mapper top_bullets cardinality
- preserve canonical render output when flag is off
2026-05-07 05:26:57 +09:00
8a201337f7 Add Phase Z B4 gatekeeper feature flag
- gate V4/B4 mismatch zones via PHASE_Z_B4_GATEKEEPER env (default OFF)
- record mismatch as adapter_needed_units with reason and mismatch_detail
- preserve render path byte-identical when flag unset
2026-05-06 17:01:47 +09:00
aca6a992b9 Add Phase Z matching architecture anchor doc
- consolidate evidence-based principles for Step 5/6/7 and B-axis matching layer
- record CompositionUnit, candidate-based composition, and 4-tier terminology
- defer bridge architecture and slot_payload evolution as scope-locked open items
2026-05-06 15:46:52 +09:00
565e6b092e Add Phase Z classifier placement diagnostics
- consume debug_zones[i].placement_trace in classify_visual_runtime_check
- surface per-zone diagnostic in fit_classification.placement_diagnostics
- preserve canonical render SHA and existing classifier output schema
2026-05-04 17:40:21 +09:00
b6b9173d2b Update CLAUDE anchor for Phase Z Layer A telemetry
- align Phase Z hierarchy terms with Layer A and Frame Slot planning
- reframe Type A/B/B'/B'' as legacy layout hints
- record trace-only render path activation as the current anchor model
2026-05-04 15:22:24 +09:00
4320f5e838 Update Phase Z status board for Layer A runtime trace
- mark content object, internal region, and placement steps as partial
- record B1-B5 and trace-only runtime activation status
- refresh current missing items and bottleneck summary
2026-05-04 10:52:06 +09:00
425a3054c1 Add Phase Z placement trace telemetry
- run B1/B2/B4 placement planning in trace-only mode
- record placement_trace per rendered zone in debug output
- preserve existing render output and visual routing behavior
2026-05-04 10:32:26 +09:00
02a6d44944 Add Phase Z frame slot telemetry markers
- add frame slot markers to F29 runtime partial
- collect per-cell frame slot metrics in visual runtime check
- preserve existing visual status and failure routing behavior
2026-05-04 10:05:03 +09:00