Commit Graph

4 Commits

Author SHA1 Message Date
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
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
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