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)
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)
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)
- 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.
- 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)
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
문서 역할 분담:
- 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>
- 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>
- .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>
전체 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>
전체 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>
- 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
- 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
- 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
- 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
- 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
- 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