Commit Graph

48 Commits

Author SHA1 Message Date
b9747c2f4a feat(#84): IMP-84 u1~u3 silent automation policy enforcement (FramePanel reject confirm + slide_base provisional badge/outline + IMP-30 visual assertions inverted)
Some checks failed
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 21s
- u1 FramePanel.tsx: extract `applyFrameSelection(candidate, onFrameSelect)`
  pure helper; collapse `handleFrameSelect` to direct onFrameSelect for every
  V4 label; drop `window.confirm` reject popup (IMP-47B u11 regression noise
  per `feedback_auto_pipeline_first`). New vitest pin `imp84_framepanel_reject_silent.test.ts`
  covers helper invocation across all 4 V4 labels + source-presence pins.
- u2 templates/phase_z2/slide_base.html: delete `.zone--provisional` CSS,
  `.zone__needs-adaptation-badge` CSS, the zone--provisional class fragment
  in the zone div, and the badge `<span>` render at the provisional zone.
  Preserve `data-provisional="1"` attribute as silent telemetry. New pytest
  `tests/phase_z2/test_imp84_provisional_silent_render.py` pins the silent
  contract independently of the IMP-30 first-render file.
- u3 tests/test_phase_z2_imp30_first_render.py: invert the three IMP-30 u5
  positive provisional-visual assertions to IMP-84 silent-contract negatives
  (no class, no badge, no CSS selectors); preserve positive `data-provisional`
  telemetry assertions. Docstrings updated to IMP-84 silent contract.

Out of scope (Round #4 + #92 contract): Home.tsx `toast.error(aiReviewMsg)`
call line, designAgentApi.ts `api_error_kinds`/`api_error_kind` schema and
operational-only formatter, FramePanel reject badge/tooltip read-only labels
(L102/L147/L156), and backend `zone.provisional` flag emission.

Stage 4 PASS: u1 vitest 10/10, u2 pytest 5/5, u3 pytest 29/29 (incl. 3
IMP-84 inverted assertions: `test_imp84_provisional_zone_silent_no_class_no_badge`,
`test_imp84_provisional_badge_never_rendered_in_mixed_zones`,
`test_imp84_slide_base_css_strips_provisional_visual_selectors`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 14:15:02 +09:00
4da22adb43 feat(#90): IMP-56 u1-u19 catch-up before final close (post-u20 push fix)
Some checks failed
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 20s
u1: text_overrides axis in user_overrides_io
u2: structure_overrides axis in user_overrides_io
u3: vite allowlist for new endpoints
u4: text_override_resolver
u5: Step 12 text_overrides apply in phase_z2_pipeline
u6: structure_override_resolver
u7: text_path_stamper
u8: SlideCanvas text-edit capture
u9: SlideCanvas structure-edit overlay
u10: userOverridesApi service extension
u11: designAgent types extension
u12: slidePlanUtils restore
u13: user_overrides endpoint tests
u14: user_overrides restore tests
u15: pipeline fallback tests
u16: edit-mode state + gating tests
u17: slide_base print mode CSS
u18: /api/connect endpoint (vite)
u19: /api/export endpoint (vite)

Recovery scope: 29 files (12 modified + 17 new). u20 already pushed in
9439575; this commit lands u1-u19 that were authored but not committed
before #90 was externally closed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 06:12:13 +09:00
8648a468d9 feat(#69): IMP-40 u1~u6 frame contract label_default placeholder/fallback role discriminator (BIM/DX leak fix)
Some checks failed
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 26s
- catalog (frame_contracts.yaml): F18 bim_dx_comparison_table col_a/col_b
  label_default_role=placeholder; F30 industry_current_status_three_col +
  F31 industry_characteristics_three_col col_a/col_b/col_c forward-compat
  placeholder; F33 engn_sw_three_types untouched (no label_default).
- mapper (_build_compare_table_2col): generic _resolve_label_default(col_key)
  branches on <col>_label_default_role — placeholder -> '' (Figma placeholder
  suppressed at runtime), fallback -> catalog literal (legacy default), unknown
  -> ValueError with template_id + role_key + value. Absent role defaults to
  fallback (backward compat for contracts without discriminator).
- tests (tests/phase_z2/test_imp40_label_default_role.py): u4 generic matrix
  (placeholder / fallback / absent / unknown / 3-col axis) + u5 F18-reuse
  non-BIM/DX synthetic rows asserting placeholder labels emit '' and BIM/DX
  literal tokens do not leak.
- snapshot (tests/integration/__snapshots__/slot_payload.json): mdx 01 F18
  string_slot_nonempty.col_a_label/col_b_label True -> False (u6 expected
  drift from u3 placeholder -> empty string flip). slot_names + rows + title
  preserved.

Verification:
- imp40_label_default_role: 6/6 PASSED
- phase_z2 sweep: 608/608 PASSED
- multi_mdx_regression: 50/50 PASSED
- cross-suite sweep: 662/662 PASSED
- BIM/DX literal grep on mapper + new test: 0 hits
- No mdx-specific branches (mdx 03/04/05 grep on mapper: 0 hits)

Guardrails: no MDX 03/04/05 hardcoding (catalog policy only); no spacing
shrink; no auto frame swap on reject; no AI call at Step 12; F33 untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:53:20 +09:00
028042aaa9 feat(#68): IMP-39 u1~u8 ranking_sort_policy single-source + backend↔frontend label-priority mirror
Some checks failed
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 23s
u1: templates/phase_z2/catalog/ranking_sort_policy.yaml — single-source policy
    (label_priority asc {use_as_is:0, light_edit:1, restructure:2, reject:3}
    + confidence desc + v4_rank asc tie-break).
u2: src/phase_z2_pipeline.py — apply_ranking_sort helper + lookup_v4_match_with_fallback
    applies policy AFTER IMP-38 raw-window selection (raw default_window + usable_count
    preserved on RAW all_judgments).
u3: src/phase_z2_pipeline.py — _build_application_plan_unit forwards ranking_sort_policy
    + sorted_candidate_evidence into Step 9 payload.
u4: Front/client/src/services/designAgentApi.ts — frame_candidates builder reads
    unit.sorted_candidate_evidence + unit.ranking_sort_policy first; local LABEL_PRIORITY
    retained only on warn-fallback path.
u5: tests/test_ranking_sort_policy.py — pure permutation coverage (sample-agnostic).
u6: tests/phase_z2/test_label_priority_synthetic.py + fixtures/ranking_sort_policy/
    synthetic_divergence.yaml — low-conf use_as_is behind high-conf restructure.
u7: tests/phase_z2/test_imp39_mdx04_env_toggle_e2e.py — samples/mdx_batch/04.mdx with
    AI_FALLBACK_ENABLED=off; backend selected_v4_rank == frontend frame_candidates[0].
u8: tests/phase_z2/test_imp39_corpus_audit.py — real corpus sweep over
    tests/matching/v4_full32_result.yaml (10 MDX sections); section IDs loaded
    dynamically (RULE 0 / RULE 7 sample-agnostic).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:12:07 +09:00
f3ef4d917c feat(#64): IMP-35 details_popup_escalation u1~u10 + Stage 3 R7 anchor re-pin
Land the production + test surface for the Step 17 cascade POPUP terminal
(DETERMINISTIC -> POPUP -> AI_REPAIR -> USER_OVERRIDE) per Stage 2 plan R2.
u11 (baseline-red invariance gate) was already landed in 7c93031 ahead of
this commit; this commit completes u1~u10 plus the Stage 3 R7 follow-up
anchor re-pin for test_imp17_comment_anchor.py.

Implementation units (Stage 2 R2 contract):
  u1  frame_reselect_insufficient failure_type + post-frame remeasure (q4)
        - src/phase_z2_failure_router.py, src/phase_z2_pipeline.py
  u2  NEXT_ACTION_BY_FAILURE row + impl_status flip
        - src/phase_z2_failure_router.py
  u3  Router details_popup_escalation MISSING->IMPLEMENTED + executor stub
        - src/phase_z2_router.py
  u4  step17.py AI split-decision contract (POPUP cascade_stage +
      route_for_label + skip_reason); API gated
        - src/phase_z2_ai_fallback/step17.py
  u5  Step 17 POPUP gate executor; popup_escalation_plan + has_popup marker
        - src/phase_z2_pipeline.py, src/phase_z2_ai_fallback/step17.py
  u6  Composition popup binding -- yaml strategy -> zone payload
        - src/phase_z2_composition.py
  u7  Pipeline composer -> render_slide wiring
      (popup_html / preview_text / has_popup)
        - src/phase_z2_pipeline.py
  u8  slide_base.html <details>/<summary> popup wrapper
        - templates/phase_z2/slide_base.html
  u9  display_strategies.yaml inline_preview + popup metadata
        - templates/phase_z2/regions/display_strategies.yaml
  u10 MDX preservation invariant: popup=full source / body=summary or subset
        (asserted by tests/phase_z2/test_popup_mdx_preservation.py)
  u11 (already in 7c93031) -- baseline-red invariance gate

Stage 3 R7 follow-up (anchor re-pin, test-only):
  - tests/orchestrator_unit/test_imp17_comment_anchor.py
    Pre-anchor additions in src/phase_z2_pipeline.py (u1 / u5 / u7) shifted
    the restructure/reject route-hint comments 578/579 -> 586/587. Re-pinned
    the two guard tests (and docstring re-pin lineage 564 -> 570 -> 578 ->
    586). Production code untouched.

Verification (Stage 4 R1):
  pytest -q tests/orchestrator_unit/test_imp17_comment_anchor.py
    -> 2 passed / 0.02s
  pytest -q <10 IMP-35 unit files in tests/phase_z2 + tests/phase_z2_ai_fallback>
    -> 136 passed / 15.94s
  Baseline-red invariance gate
    (tests/test_imp47b_step12_ai_wiring.py +
     tests/test_phase_z2_ai_fallback_config.py)
    -> 4 failed / 6 passed; FAILED set === IMP35_BASELINE_RED_NODE_IDS
    (frozen registry from 7c93031). Contract holds.
  Codex Stage 4 R1 = YES (independent verify).

Guardrails honored:
  - MDX content preservation: popup carries full source, body holds
    summary or subset only (CLAUDE.md 자세히보기 원칙;
    feedback_phase_z_spacing_direction -- capacity expanded, no margin shrink).
  - AI isolation contract: Step 17 POPUP gate is deterministic; AI hook
    surface is split-decision contract only, API call gated.
  - No hardcoding: escalation thresholds derived from existing overflow
    detector outputs; preview_chars deterministic from container px.
  - 1 commit = 1 decision unit: u1~u10 land together as the planned
    production surface; u11 was deliberately split into 7c93031 as Stage 3
    R7 carve-out, and the R7 anchor re-pin rides with this commit because
    it is the direct shift consequence of the u1/u5/u7 pre-anchor additions.
  - Scope-locked: .claude/settings.json explicitly excluded
    (Stage 4 exit report contract).

Out of scope (per Stage 1 + Stage 2):
  - AI_REPAIR API activation (post IMP-35 axis).
  - IMP-34 zone resize, IMP-36 responsive fit (chain partners,
    separate issues).
  - Print-time auto-expand JavaScript for <details>.
  - Popup escalation in stages other than Step 17.
  - Baseline-red body repair (4 frozen failures) -- separate follow-up
    issue; u11 only guards the count.
  - frame_reselect algorithm changes (entry point only).
  - templates/phase_z2/slide_base.html path rename.

source_comment_ids:
  Stage 1: claude_stage1_problem_review_imp35, codex_stage1_verification_imp35_yes
  Stage 2: Claude #4 R2 plan, Codex #5 R2 YES
  Stage 3: Claude #86 (R7 anchor re-pin), Codex #87 YES
  Stage 4: Claude #88 R1, Codex #89 R1 YES

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 07:36:57 +09:00
c1df656312 feat(#65): IMP-36 fit/rotation generalization (u1~u8)
Generalize Phase Z frame partial responsive fit / rotation to four canonical
F13/F14/F20/F8 family partials. Surface = 13 canonical partials; 19
builder-only contracts remain explicitly out of scope.

u1  test_imp17_comment_anchor: re-pin L570->L578 (restructure+IMP-17),
    L571->L579 (IMP-29 -> IMP-47B supersession). Stage 1 red baseline gate.
u2  frame_contracts.yaml: add rotation_eligible (P1) + body_fit_pattern2 (P2)
    bool axes on 13 partial-backed contracts. P1 True: F13/F14/F20/F8 (4).
    P2 True: F23 + P1_set (5). F29 columns[1].body_parser column_plain ->
    column_with_transform (P3 parity).
u3  test_imp36_fit_rotation_generalization (NEW, 166 lines): static
    parametrized assertions for P1 metadata + CQ presence, P1 opt-out
    absence, P2 --max-body-lines + clamp + cqh, P2 opt-out absence, 19
    builder-only exclusion.
u4  three_parallel_requirements (F13): introduce f13b-root container-name +
    container-type:size + @container (aspect-ratio<1.5) rotation;
    add inline --max-body-lines + body line-height clamp/cqh/calc.
u5  three_persona_benefits (F14): f14b-root P1 + P2 cqh/jinja body fit.
    Persona colors (#285b4a/#445a2f/#743002) and circle SVG aspect 1/1
    preserved.
u6  dx_sw_necessity_three_perspectives (F20): f20b-root P1 + P2 cqh/jinja
    body fit under IMP-49 partial-fidelity lock.
u7  info_management_what_how_when (F8): f8b-root P1 + P2 cqh/jinja body fit.
u8  test_imp36_overflow_chain_self_fire (NEW, 299 lines): Selenium self-fire
    harness for F13/F14/F20/F8 at aspect 1.78 vs 1.0. Asserts line-height
    changes, font-size invariance across all 4 frames (no per-frame exempt),
    grid columns rotate 3 -> 1, OVERFLOW_CASCADE_ORDER remains 4-tuple.

Stage 4 verification (HEAD 6f1c736 pre-commit baseline):
  u1 2/2 PASS, u3 33/33 PASS, u8 9/9 PASS (live Chrome).
  Regression sweep tests/phase_z2 + tests/orchestrator_unit 335/335 PASS.
  font-size mutations introduced: 0.
  Pre-existing red (test_imp47b_step12_ai_wiring x3, ai_fallback_master_flag
  default_off x1) verified unchanged via stash swap -> not introduced.

Guardrails honored:
  - cqh / clamp / container query only (no shared margin/padding/gap shrink).
  - font-size invariant under aspect change (P2 mutates line-height +
    --max-body-lines only).
  - No cross-frame .fNb__ class borrowing (IMP-49 partial-fidelity lock).
  - F14 circle SVG aspect 1/1 untouched; persona colors preserved.
  - AI isolation: no HTML structure generation; AI calls remain zone-content.
  - 1 turn = 1 step; commit excludes .claude/settings.json and all
    out-of-scope untracked worktree per Stage 4 binding contract.

source_comment_ids: Stage 1 #13/#14; Stage 2 #21/#22; Stage 3 #4 + Codex #4
YES; Stage 4 Claude #1 + Codex #3 PASS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 01:18:20 +09:00
79f9ea5c92 feat(#78): IMP-49 dx_sw_necessity partial Figma provenance fix (u1~u3)
Replace eyeballed PROMOTED green hex (#296B55, #123328) with verbatim
upstream values from figma_to_html_agent/blocks/1171281198/index.html:
- border + check mark: #1d4d3e (upstream :208 -webkit-text-stroke)
- header gradient: rgb(15, 50, 30) / rgb(60, 52, 34) (upstream :54, :64)

Document .f20b__* as authoring-ordinal namespace (NOT Figma frame_id
1171281198); structural link via data-frame-id attribute. No selector
rename, no catalog edit.

Add focused regression test (tests/test_imp49_partial_figma_provenance.py)
extracting <style>-block hex/rgb/rgba literals and asserting non-whitelisted
literals exist byte-identically in upstream source. Whitelist limited to
neutrals (#fff, #1a1a1a) + shared zone-title token (#000, #883700,
rgba(50,44,30,0.4)).

Scope: dx_sw_necessity_three_perspectives.html only. 19 missing partials,
.fNb__ rename, full 32-contract audit deferred to follow-up axes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 02:49:43 +09:00
90503cadd6 feat(#67): IMP-38 V4 max_rank policy formalization (u1~u3, 4 round consensus)
- u1: separate templates/phase_z2/catalog/v4_fallback_policy.yaml + load_v4_fallback_policy() loader
  (catalog pollution prevention — Codex #1 correction)
- u2: dynamic effective max_rank in lookup_v4_match_with_fallback (3-variable ceiling min,
  Codex #2 correction: min(configured, len(judgments_full32))) + 3-tier usable predicate
  (status + catalog + optional capacity) + trace 8 fields (requested/default/configured_extended/
  judgments_count/effective_extended_ceiling/effective_max_rank/usable_count/policy_applied)
- u3: 2 production call site cleanup (max_rank=3 removed, HEAD baseline) + tracked
  Front/vite.config.ts PHASE_Z_MAX_RANK env retired + 4 regression scenarios

verified: 32 passed (IMP-38 focused scope) — IMP-05 L4 dedup / L2 schema preserved,
IMP-30 allow_provisional byte-identical, caller_override backward compat (tests)

Stage cycle (#67, 7 round Claude + 5 round Codex):
- Stage 1: Claude #1 -> Codex #1 YES + 5 corrections
- Stage 2 r1+r2: Claude #2-#4 -> Codex #2 Q2 -> Codex #3 YES (4 round consensus LOCK 23195)
- Stage 3 U1+U2+U3: Claude #5-#9 -> Codex #6 NO 4to3 correction -> Codex #7 YES -> Codex #8 YES
- Stage 4: Claude #11 -> Codex #9 (anchor attribution nuance) -> Codex #10 readiness -> Codex #11

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 22:14:05 +09:00
a06dd3d4b0 feat(#42): IMP-04b catalog extension to 32 frames (u1~u24)
Extends frame_contracts.yaml from 11 to 32 contracts to match V4 evidence
(tests/matching/v4_full32_result.yaml unique template_ids), closing the
IMP-04b gap surfaced in IMP-04 (#4) Track A milestone.

Scope (Stage 2 24-unit plan):
- u3/u4: WIP partial absorb — app_sw_package_vs_solution (F23),
  pre_construction_model_info_stacked (F9). Both promoted from
  _WIP_FILES.md to frame_contracts.yaml. WIP allowlist now empty.
- u5~u11: Track A 7 frames (index.html present, contract missing).
- u12~u23: Track B 12 frames (visual_pending: true; family partial
  authoring deferred — contract-first per Stage 2 plan).
- u24: BT closure gate. Adds
  test_imp04b_closure_gate_v4_coverage_and_wip_empty (catalog ↔ V4
  set-equal + WIP==0) and test_vp_exempt_keys_are_contracted_and_disk_absent
  (vp ∩ disk == ∅). Relaxes test_contracts_set_equals_disk_families_minus_wip
  to (disk - wip) ∪ vp. 32 derived from V4 evidence YAML (no hardcoding).

Closure facts (locked):
  contracts = 32, v4_unique = 32, missing = [], extra = [],
  wip_count = 0, vp_count = 19, vp ∩ disk = [].

Guardrails honored:
- No calculate_fit migration.
- No AI/Kei API call in per-frame work.
- No 1-2 sample hardcoding (Codex #7 generalization guardrail).
- No production refactor for tests (IMP-32 owns helper extract).
- figma_to_html / V4 / Phase Z 3-layer separation preserved.
- 1 commit = 1 IMP-04b decision unit (bundled u1~u24 per Stage 2
  plan; CAT+WIP atomicity for u3/u4 preserved).

Tests: tests/test_family_contract_baseline.py 4/4 PASS.
Cross-ref: IMP-04 (#4), IMP-29 (#38), IMP-30 (#39), IMP-31 (#40),
IMP-32 (#41), IMP-33 (#61), IMP-47A (#75).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 19:39:16 +09:00
1efbf672bd feat(#39): IMP-30 first-render invariant + abort bypass (2 paths)
Restore first-render invariant: final.html + Step 20 slide_status MUST be
written for every input where Step 0~5 succeed. Two abort paths replaced
with provisional/empty-shell synthesis; MDX content preserved, AI-free.

- u1 V4Match.provisional + lookup_v4_match_with_fallback(allow_provisional)
  chain_exhausted -> synthesize rank-1 provisional (opt-in, default-off)
- u2 CompositionUnit.provisional propagation (single / parent_merged /
  parent_merged_inferred constructors)
- u3 select_composition_units(allow_provisional_fill=True) last-resort
  fill + _candidate_state="selected_provisional"
- u4 pipeline.py path-(a) abort guard replaced with provisional retry +
  terminal __empty__ shell (no sys.exit(1))
- u5 zones_data.provisional -> slide_base.html zone--provisional class +
  data-provisional + needs-adaptation badge (template-only)
- u6 compute_slide_status additive provisional_first_render_count/_units
  (overall enum unchanged per IMP-05 Codex #10 D4)
- u7 regression: tests/test_phase_z2_imp30_first_render.py (28 tests) +
  tests/test_phase_z2_v4_fallback.py (+5 cases)

Guardrails verified: MVP1_ALLOWED_STATUSES unchanged, no calculate_fit,
no LLM in fallback path, no MDX 03/04/05 hardcoding.

Anchor sync (Rule 13): tests/orchestrator_unit/test_imp17_comment_anchor.py
re-pinned 564/565 -> 570/571 to track V4Match.provisional shift at
src/phase_z2_pipeline.py:179-184.

Cross-ref: IMP-05 (#5) §5 defer + Codex #2 first-render invariant.
2026-05-21 00:40:58 +09:00
8f06a4c99f docs(IMP-52): reconcile Phase Z family count drift -- F-2 option (c)
Audit follow-up F-2 (INTEGRATION-AUDIT-01 §10.2). Phase Z families surface
showed 11 tracked / 11 contracted / 13 on disk. The 2 untracked WIP files
(app_sw_package_vs_solution.html, pre_construction_model_info_stacked.html)
are now declared in _WIP_FILES.md as uncontracted and out-of-scope for the
runtime matcher; promote/remove is gated on #42. The 11/11 tracked +
contracted baseline is unchanged. A new pytest enforces tracked families ↔
frame_contracts.yaml set-equality modulo the WIP allowlist parsed from
_WIP_FILES.md, so future drift fails fast in CI before #42 expands to 32
frames.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 19:15:04 +09:00
7a52cebfaa feat(IMP-14): A-4 — slide_base embedded vs standalone mode contract
Step 13 owns iframe-vs-standalone CSS contract in slide_base.html via
3-valued embedded_mode enum (auto / embedded / standalone). Removes
SlideCanvas.tsx runtime CSS injection workaround; frontend now passes
?embedded=1 query so auto-mode script attaches html.embedded class and
scopes the standalone body centering/min-height/padding reset.

- templates/phase_z2/slide_base.html: conditional html.embedded class +
  CSP-safe auto-mode <script> + additive html.embedded body/.slide rules
- src/phase_z2_pipeline.py: render_slide gains keyword-only embedded_mode
  ("auto" default) + ValueError guard; 3 existing call sites unchanged
- Front/client/src/components/SlideCanvas.tsx: derive embeddedSrc with
  ?embedded=1 (query-preserving), drop reset CSS injection block
- tests/phase_z2/test_slide_base_embedded_mode.py: 6 cases — auto script,
  CSS rules, embedded/standalone explicit modes, byte-determinism,
  invalid-mode guard
2026-05-18 07:21:31 +09:00
73a98b8ad1 IMP-04 F17 schema correction — paired_rows_4x2 + pill alternation + source-faithful theme
source = 8 atomic issues (4 paired rows × 2 cells per texts.md), 이전 strict-4
가 source 의 절반 누락. round 55~73 review-loop 의 calibration frame.

- contract : source_shape=top_bullets / layout_variant=paired_rows_4x2_alternating_pills
  / strict 8 (no pad/truncate) / role_order row_{1..4}_{left,right} / visual_hints
  pill_positions + row_gap_after / builder paired_rows_4x2_slots
- builder : new _build_paired_rows_4x2_slots — 2-axis (row × side) deterministic
  index mapping, strict 8 raises before render, quadrant_item parser 재사용
- partial : 4-row × 2-cell flex, pill alternation (row 1/3 top, row 2/4 bottom
  via column-reverse), row 2-3 visual gap, source-faithful color (rgb(204,82,0)
  →rgb(136,55,0) title + #60A451 row border + rgba(250,237,203,0.15) bg + #0c271e
  body + 2px dashed #60A451 cell 분할선), pill = CSS approximation (asset crop
  variant single-pass 비용 高 → fallback per Codex round 62/68 scope cap, pill
  shape + alternation + green/cream/brown theme 보존), no row headers (source
  부재, inference 금지)
- fixture : flat 8 top-bullet (texts.md 8 issues 그대로)
- smoke + R3 : PASS (11/11 self-check, 5535 chars partial, 8 units rendered,
  pill alternation 정합, row 2-3 gap, no invented row headers)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 15:13:46 +09:00
5c27c492ba feat(catalog): activate bim_current_problems_paired (IMP-04 Track A 8/16)
V4 signal = restructure 1 (4 MDX sample). Catalog-completeness activation —
Codex round 51 guardrail (per-frame source-evidence check, not blind F16
reuse). Source confirmed as 2x2 paired-rows BIM problem layout, distinct
from F16's quadrant-4 framing.

3-layer architecture (matrix §0) :
- V4 = matching authority — restructure tier signal; runtime activation
  prepares Phase Z to assemble this frame when V4 ranks it.
- figma_to_html (1171281194) = source/evidence — 4 BIM problem cards in
  2x2 grid (개념 부재 / 잘못된 접근방식 / 방향성 상실 / 전제조건 오류).
- Phase Z = runtime — adds catalog + partial + smoke fixture.

Builder reuse :
- `quadrant_flat_slots` reused with pad_to=4 + `issue_{n}_label/body` keys.
- `quadrant_item` parser reused.
- F16 quadrant pattern reused, but the partial is a 2-row × 2-column
  problem-theme grid (red/orange/amber/deep-amber), not the F16 TL/TR/BL/BR
  quadrant visual. Source-evidence-driven decision per Codex round 51 §10.

3 file changes :

1. templates/phase_z2/families/bim_current_problems_paired.html
   - 2x2 CSS grid with per-issue problem theme.
   - PROMOTED CSS : per-cell warning gradient (red/orange/amber/deep-amber),
     title gradient (zone-title family), "!" bullet markers in per-cell color.
   - NOT PROMOTED : Figma source banner / numbered badges / texture —
     figma_to_html source evidence preserved for future fidelity review.
   - ADAPTED : Figma absolute positioning → CSS grid 2x2, token-fixed
     typography.

2. templates/phase_z2/catalog/frame_contracts.yaml — F17 contract appended
   - frame_id=1171281194, family=cards, source_shape=top_bullets, strict 4,
     role_order=[issue_1..issue_4].
   - visual_hints.min_height_px = 350 (F16/F14 class — 2-row × 2-col density).
   - accepted_content_types = [text_block].
   - payload.builder = quadrant_flat_slots reuse with issue_{n}_* keys.

3. scripts/smoke_frame_render.py — bundled fixture for F17.

Verification :
- python scripts/smoke_frame_render.py --self-check : PASS 11/11 (F17 at
  3856 chars CSS-only)
- python scripts/smoke_frame_render.py bim_current_problems_paired
  --render-to data/runs/imp04_f17_visual : PASS, 0 raster refs
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_f17_regression :
  PASS (MDX 03 V4 rank-1 unchanged; F17 not in MDX 03 V4 selection so
  this is non-impacting regression check)

scope-lock honored : V4 logic / mapper / production render / Phase R' /
AI/Kei / 10 existing partials all unchanged.

4-class status :
- class 1 readiness : 
- class 2 content-fit : watch — paragraph-heavy source (each issue body
  is multi-line Korean text). Compact 2x2 cell may need wrap. max-content
  fit checked via R3 artifact.
- class 3 : N/A
- class 4 : N/A

Refs Gitea #4 (IMP-04 Track A frame 8 — V4 RS tier, source-evidence-confirmed)
2026-05-13 13:39:30 +09:00
735e58420e feat(catalog): activate sw_reality_three_emphasis (IMP-04 Track A 7/16)
Catalog-completeness activation — NOT V4 endorsement (Codex round 49 §1+§2
guardrail). V4 signal = 0 across the current 4 MDX sample. Phase Z adds
runtime availability so V4 can route to this frame for future MDX content.

V4 remains the matching authority.

3-layer architecture (matrix §0) :
- V4 = matching authority — current sample evidence does NOT rank this frame
  for the 4 MDX. activation must not be read as V4-driven promotion.
- figma_to_html (1171281209) = source/evidence — 3-emphasis problem cards
  (토목 전문성 부족 / 비효율성 / 실무 적용 불가). full A+T+I+F+S.
- Phase Z = runtime — catalog + partial + smoke fixture added.

Builder reuse (per Codex round 49 §9 — single-frame, no batch yet) :
- `quadrant_flat_slots` reused with pad_to=3 + `emphasis_{n}_label/body`.
- `quadrant_item` parser reused.
- mapper.py unchanged.

3 file changes :

1. templates/phase_z2/families/sw_reality_three_emphasis.html
   - 3-column grid with problem-emphasis theme (red/orange/amber per
     column — frame intent is 약점/한계 진단).
   - PROMOTED CSS : per-emphasis warning color, title gradient, bullet
     markers in per-emphasis color, "!" bullet for warning semantic.
   - NOT PROMOTED : Figma source decoration / banner / texture.
     figma_to_html source evidence preserved.
   - ADAPTED : Figma absolute → flex 3-column grid, token-fixed typography.

2. templates/phase_z2/catalog/frame_contracts.yaml — F28 contract appended
   - frame_id=1171281209, family=cards, source_shape=top_bullets, strict 3,
     role_order=[emphasis_1/2/3].
   - visual_hints.min_height_px = 320.
   - accepted_content_types = [text_block].
   - payload.builder = quadrant_flat_slots (reuse) with emphasis_{n}_* keys.

3. scripts/smoke_frame_render.py — bundled fixture for F28.

Verification :
- python scripts/smoke_frame_render.py --self-check : PASS 10/10 (F28 at
  3363 chars CSS-only)
- python scripts/smoke_frame_render.py sw_reality_three_emphasis
  --render-to data/runs/imp04_f28_visual : PASS, 0 raster refs
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_f28_regression :
  PASS

scope-lock honored : V4 logic / mapper / production render / Phase R' /
AI/Kei / existing 9 partials all unchanged.

4-class status :
- class 1 readiness : 
- class 2 content-fit : watch (problem description text may be longer than
  3-card body budget)
- class 3 : N/A (V4-zero, catalog-completeness — not a mapping concern)
- class 4 : N/A

Refs Gitea #4 (IMP-04 Track A frame 7 — V4-zero catalog completeness)
2026-05-13 13:27:23 +09:00
46ff611a54 feat(catalog): activate info_management_what_how_when (IMP-04 Track A 6/16)
Catalog-completeness activation — NOT V4 endorsement (Codex round 47 §7
guardrail). V4 signal = 0 across the current 4 MDX evidence sample, but
the 32-frame all-in scope means runtime backend must accept this frame
when V4 ranks it for any future MDX outside the current sample.

V4 remains the matching authority. Phase Z adds runtime availability only.

3-layer architecture (matrix §0) :
- V4 = matching authority — current evidence does not rank this frame for
  the sampled 4 MDX, so this activation must not be read as a V4-driven
  promotion. It is purely catalog completeness so V4 can route to this
  frame when warranted in future MDX content.
- figma_to_html (1171281179) = source/evidence — analysis/texts/index/flat/
  assets all present, source intent is the What/How/When 3-section
  framework.
- Phase Z = runtime — this commit adds catalog contract + partial + smoke
  fixture. Builder reuse, no new builder/parser.

Builder reuse (Codex round 47 secondary criterion under exhausted V4 tier) :
- `quadrant_flat_slots` reused (F16/F11/F20 pattern) with pad_to=3 +
  `section_{n}_label/body` key patterns.
- `quadrant_item` parser reused.
- mapper.py unchanged.

3 file changes :

1. templates/phase_z2/families/info_management_what_how_when.html
   - 3-column grid (What / How / When), each with header + body bullets.
   - PROMOTED CSS : per-section accent color (blue #2563eb What / orange
     #ea580c How / green #16a34a When), title gradient (#000#883700
     zone-title family), bullet markers in per-section accent color.
   - NOT PROMOTED (P1 case-by-case + preservation guardrail) : Figma
     상단 banner / icon / 배경 텍스처 / 장식. figma_to_html source
     evidence preserved for future fidelity review.
   - ADAPTED : Figma 50px+ → token-fixed, absolute positioning → flex grid.

2. templates/phase_z2/catalog/frame_contracts.yaml — F8 contract appended
   - frame_id=1171281179, family=cards, source_shape=top_bullets, strict 3,
     role_order=[section_1 (What), section_2 (How), section_3 (When)].
   - visual_hints.min_height_px = 320 (F11/F20 class — 3-column header+body).
   - accepted_content_types = [text_block].
   - 3 sub_zones (section_1/2/3 main_text).
   - payload.builder = quadrant_flat_slots (reuse) with section_{n}_* keys.

3. scripts/smoke_frame_render.py — bundled fixture for F8 self-check.

Verification :
- python scripts/smoke_frame_render.py --self-check : PASS 9/9 (F8 added at
  3577 chars CSS-only)
- python scripts/smoke_frame_render.py info_management_what_how_when
  --render-to data/runs/imp04_f8_visual : PASS, R3 artifact, 0 raster refs
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_f8_regression :
  PASS (MDX 03 V4 rank-1 unchanged; F8 V4 signal = 0 across 4 MDX sample,
  so not selected for MDX 03 either — purely catalog completeness)

scope-lock honored (3-layer + 4-class) :
- V4 logic / V4 evidence yaml : unchanged
- Existing PAYLOAD_BUILDERS / ITEM_PARSERS : unchanged (reuse only)
- Existing 8 partials : unchanged
- Composition planner / production render / Phase R' / AI/Kei : unchanged

4-class status :
- class 1 readiness :  contract + builder reuse + partial + smoke + R3
- class 2 content-fit : watch — header single-line, body 3-5 bullets per
  column. 6+ bullets per column may overflow.
- class 3 / 4 : N/A

Refs Gitea #4 (IMP-04 Track A frame 6 — V4-zero catalog completeness)
2026-05-13 13:19:03 +09:00
bc58102b66 feat(catalog): activate dx_sw_necessity_three_perspectives (IMP-04 Track A 5/16)
Reason : V4 LE=2 (03-1 + 01-1) + RS=1 — V4 LE tier strongest remaining
after F12/F11/F18 UAI tier. Track A frame 5 per Codex round 45 V4-priority
acceptance.

3-layer architecture (matrix §0) :
- V4 = matching authority — V4 ranked this frame light_edit for 03-1 (DX 시행
  필수 요건) and 01-1 (용어 정의).
- figma_to_html (1171281198) = source/evidence — 386-line index.html + assets/.
- Phase Z = runtime — this commit adds catalog + partial + smoke fixture.

Builder reuse (no new builder/parser introduced) :
- Reuses existing `quadrant_flat_slots` builder (F16/F11 pattern) with
  pad_to=3 + `perspective_{n}_label` / `perspective_{n}_body` keys.
- Reuses existing `quadrant_item` parser.
- Same flat-keyed label+body grammar as F11; only N=3 + key names differ.
- mapper.py unchanged — secondary builder reuse per Codex round 45.

3 file changes :

1. templates/phase_z2/families/dx_sw_necessity_three_perspectives.html
   - Adapted from figma_to_html_agent/blocks/1171281198/index.html.
   - 3-column grid (BIM 전면설계 / 디지털 전환 S/W / 고부가가치 산업전환).
   - PROMOTED CSS : header bar dark green (#296B55 → #123328 Figma green
     family), header text white bold, title gradient (#000#883700
     F13/F14/F12/F11/F18 zone-title family), card border + bullet markers
     (green family).
   - NOT PROMOTED (P1 case-by-case + preservation guardrail per Codex
     round 37) : 상단 dark green banner ("디지털 전환(DX)은 S/W가 필수다"
     visual block), 좌측 DX circular area (multi-image + center text +
     decor — main rhetorical anchor but cannot fit compact zone),
     hanmaek/한자/배경 텍스처. figma_to_html source evidence preserved.
   - ADAPTED : Figma 90/65/40 px → token-fixed, 1280×426 absolute +
     zoom → Phase Z 3-column grid, 3 perspective cards → flex column.

2. templates/phase_z2/catalog/frame_contracts.yaml
   - F20 contract appended.
   - frame_id=1171281198, family=cards, source_shape=top_bullets, strict 3,
     role_order=[perspective_1, perspective_2, perspective_3].
   - visual_hints.min_height_px = 320 (3 col × header 30 + body bullets ~75
     + title 30 + padding 30 = ~195 + 125 buffer for label/5+ bullet
     overflow; F12/F11/F18 class).
   - accepted_content_types = [text_block].
   - 3 sub_zones (perspective_1/2/3 main_text).
   - payload.builder = quadrant_flat_slots (reuse) with perspective_{n}_*
     key patterns.

3. scripts/smoke_frame_render.py — bundled fixture for F20 self-check.

Verification :
- python scripts/smoke_frame_render.py --self-check : PASS 8/8 (F20 added
  at 3160 chars CSS-only)
- python scripts/smoke_frame_render.py dx_sw_necessity_three_perspectives
  --render-to data/runs/imp04_f20_visual : PASS, R3 artifact, 0 raster
  refs (CSS-only)
- python run_mdx03_pipeline.py --phase-z2 --run-id imp04_f20_regression :
  PASS (MDX 03 V4 rank-1 still F13/F29; F20 light_edit candidate for 03-1
  but F13 was use_as_is at higher rank, so F20 not selected here)

scope-lock honored (3-layer + 4-class) :
- V4 logic / V4 evidence yaml : unchanged
- Existing PAYLOAD_BUILDERS (5 builders) : unchanged. No new builder added.
- Existing ITEM_PARSERS (3 parsers) : unchanged. No new parser added.
- Existing 7 partials : unchanged.
- Composition planner / production render / Phase R' / AI/Kei : unchanged.

4-class status :
- class 1 readiness :  contract + builder reuse + partial + smoke fixture
  + R3 artifact aligned.
- class 2 content-fit : watch — header single-line, body 3-5 bullets per
  column. 6+ bullets per column may overflow.
- class 3/4 : N/A.

Codex review remains useful (per scope-lock §5 "shared catalog/builder
logic" category — quadrant_flat_slots is now reused by F16/F11/F20). New
builder/parser path is NOT this commit.

Refs Gitea #4 (IMP-04 Track A frame 5 — V4 LE tier, builder reuse)
2026-05-13 12:28:49 +09:00
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
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
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
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
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
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
4144dc4c21 Add Phase Z runtime templates
- add slide base template for Phase Z rendering
- add family partials for F13, F29, and F16 frames
2026-05-04 09:34:27 +09:00
2ec8fc5a77 Add Phase Z Layer A planning scaffold
- add Internal Region model to Phase Z architecture docs and specs
- add frame contract content type and Frame Slot declarations
- add dormant content object extractor and internal region planner
2026-05-04 08:21:50 +09:00
8e577b3163 토큰 기반 CSS 체계 구축 + slide-base 스타일 분리
- tokens: typography(35변수), spacing(28변수), colors(41변수) 정의
- slide-base.html: 인라인 style 제거, Jinja include로 토큰/CSS 조립
- slide-base.css: 모든 직접값을 토큰 변수 참조로 전환 (직접값 0)
- block_assembler.py: Template → Environment.from_string (include 지원)
- TOKENS-v1.md: 위계 기준표 초안 + component token 후보
- BLOCK-RULES.md: 블록 작성 규칙 (spacing 문구 실제 토큰과 일치)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 13:56:03 +09:00
66c00924ed Add Type B slide pipeline and recipe rendering updates 2026-04-15 16:39:50 +09:00
360cd8e44c 블록 템플릿 업데이트: 수정 3개 + 신규 17개 + catalog.yaml 재정비
수정:
- compare-2col-badge, compare-detail-gradient, hero-icon-cards 개선

신규 블록:
- cards: category-strip-table, system-2col-center, hero-icon-cards_1
- emphasis: checklist-dark
- visuals: cycle-orbit
- new/: cards-3col-persona, compare-vs-rows, cycle-3way-intersect 등 8개
- redesign/: card_hero-icon-cards_1
- svg/: arc_left, arrow_conclusion, arrow_down, line_divider
- BEPs: process-product-2col SVG + 테스트

catalog.yaml 전면 재정비 (슬롯 스키마, height_cost, 카테고리 정리)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:58:09 +09:00
05703c8e72 WIP: hero-icon-cards_1 블록 + 오답노트 + figma 관련 파일
- hero-icon-cards_1.html: hero-icon-cards 변형 (icon → 소제목+불릿 계층)
- compare-detail-gradient.html: 하단 2열 비교 블록 (Figma Frame 4 기반)
- 오답노트.md: 절대 하지 말아야 하는 실수 목록
- figma_to_html.py: Figma→HTML 변환 스크립트
- static/figma-assets/: Figma export 이미지 (배지, 화살표)
- 주의: compare-detail-gradient CSS 폰트 크기가 임의 수정됨 — 원본 복원 필요

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:14:09 +09:00
076aeb0403 Type B'' 추가: 참고 이미지 스타일 (색상바+여백, border 없음)
- block_assembler_b2.py: B'' 전용 조립 함수 (별도 파일)
- 상단: 색상 바 제목 + 소제목(accent 색상) + 불릿(들여쓰기)
- 하단: 색상 바 제목 + 표(있으면) + 불릿
- border/gradient 박스 없음, 여백과 폰트로 구분
- 이제부터 스타일 세부 조정은 하나씩 반영 예정

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:51:10 +09:00
cba2ec2be7 03번 B' 개선: 카드 flex:1 균등 + 결론 텍스트 중복 제거
- block_assembler B': 카드 div에 flex:1 추가 → 가로 균등 높이/폭
- block_assembler: [핵심요약:] 이후 라인 break → 결론 텍스트가 하단에 섞이는 문제 해결
- 남은 문제: 하단 좌 콘텐츠 잘림, 상단 자연(여건) 불릿 잘림

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:15:26 +09:00
1f7579cf64 Phase W + V' 완료: before→filled→after 파이프라인 + 조립 로직 수정
Phase W:
- weight 비율 초기 배정 (space_allocator header 높이 반영)
- block_assembler 공통 조립 함수 (filled/assembled 통합)
- filled → Selenium 측정 → context 저장
- sidebar overflow 확장 + body 재배분
- sub_layouts 사전 계산 (이미지 누락 해결)

Phase V':
- 팝업 링크 우측상단 배치 (인라인 → position:absolute)
- 표 내용 Kei 판단 (공란 크기 계산 → 행/열 산출 → Kei 요약)
- 출처 라벨 삭제 + 이미지 아래 캡션 배치
- after 공란 제거 (결론 바로 위까지 body/sidebar 채움)

추가:
- V-10 bold 키워드: 기계적 추출 → Kei 문맥 판단
- ** 마크다운 → <strong> 변환
- [이미지:] 마커 제거 (bold 변환 전 처리)
- grid-template-rows AFTER 크기 반영 (Sonnet final)
- assemble_stage2 CSS font-size override, white-space fix
- 하드코딩 전수 검토 완료
- 본심 여러 topic 텍스트 합침

Phase X 계획 문서 작성 (동적 역할 구조)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 05:00:52 +09:00
29f56187c0 Phase P~S 전체 작업물: 검증 스크립트, 블록 템플릿, 설계 문서, 코드 수정
포함 내용:
- Phase P/Q/R/S 설계 문서 (IMPROVEMENT-PHASE-*.md)
- 영역별 검증 스크립트 (scripts/verify_*.py, test_*.py)
- 블록 템플릿 추가 (cards, emphasis 변형)
- 코드 수정: block_search, content_editor, design_director, slide_measurer
- catalog.yaml 블록 목록 업데이트
- CLAUDE.md, PROGRESS.md, README.md 업데이트

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 08:38:06 +09:00
b0bcffc0f6 Phase N+O: 컨테이너 기반 레이아웃 + Step B 제거 + 전면 정리
- Phase N: catalog 개선, fallback 전면 제거, Kei API 무한 재시도, topic_id 버그 수정
- Phase O: 컨테이너 스펙 계산(비중→px), 블록 스펙 확정, 렌더러 container div
- Step B(Sonnet) 제거: Kei(A-2)+코드로 대체. STEP_B_PROMPT/fallback/DOWNGRADE_MAP 삭제
- Selenium: container div 감지 추가
- catalog.yaml: ref_chars 구조 변환 + FAISS 재빌드
- 문서 전면 갱신: README, PROGRESS, IMPROVEMENT, Phase I~O md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:20:51 +09:00
ffad1ba82a Phase I 실행 완료 + 프로세스 재설계 (Stage 2.5 → Stage 5)
Phase I: 전수 정합성 복구 + 넘침 처리 패러다임 전환 (14개 항목)
- I-14: SSE 유틸 공통 추출 (src/sse_utils.py 신규, 3개 파일 중복 제거)
- I-13: dead code 3건 삭제 (_call_anthropic_direct, _extract_sse_text x2) + import anthropic 제거
- I-1: STEP_B_PROMPT purpose 가이드 미존재 블록 3개 → 실존 블록 교체
- I-2: catalog.yaml not_for 13건 미존재 블록 참조 교체/제거
- I-12: BLOCK_SLOTS 주석 개수 수정 (cards 9, visuals 6, emphasis 10)
- I-10: INDEX.md 38개 동기화 (삭제된 8개 블록 행 제거)
- I-11: README.md 38개 동기화 (_legacy 제거, 트리/개수 정리)
- I-3: PURPOSE_FALLBACK 상수 + purpose 기반 미등록 블록 교체
- I-7: compare-pill-pair 단독 사용 금지 검증
- I-4: 38개 블록 전체에 slot_desc 추가
- I-5: 편집자 프롬프트에 slot_desc 전달 로직
- I-6: 제목 유사도 70% 초과 시 자동 교정
- I-9: 넘침 판단 Kei API 호출 (KEI_OVERFLOW_PROMPT, call_kei_overflow_judgment)
- I-8: 대형 콘텐츠 정보 Kei overflow 프롬프트에 포함

프로세스 재설계:
- Stage 2.5 제거 → Stage 5에서 Sonnet 감지 + Kei 판단 통합
- _review_balance() 확장: zone 예산 + overflow_detected action 추가
- Stage 5 루프에 Kei 넘침 판단 호출 통합
- _apply_adjustments()에 kei_trim/kei_restructure action 추가
- _build_overflow_context(), _convert_kei_judgment() 헬퍼 함수 추가
- DOWNGRADE_MAP은 Kei API 실패 시 비상용으로만 잔존

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:06:21 +09:00
7038418c8b Revert "삭제된 템플릿 파일 복원 (card-text-grid, conclusion-accent-bar 등 8개)"
This reverts commit b347090baa.
2026-03-25 22:11:40 +09:00
b347090baa 삭제된 템플릿 파일 복원 (card-text-grid, conclusion-accent-bar 등 8개)
다른 Claude가 커밋 시 의도치 않게 삭제한 핵심 템플릿 파일 복원:
- cards/card-text-grid.html
- emphasis/conclusion-accent-bar.html
- emphasis/quote-left-border.html
- emphasis/details-block.html
- visuals/layer-diagram.html
- visuals/pyramid-hierarchy.html
- visuals/timeline-horizontal.html
- visuals/timeline-vertical.html
- _legacy/ 전체 (13개)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:08:21 +09:00
7ac9eea21a 런타임 품질 개선: Kei JSON 파싱 + 높이 예산 강제 + conclusion 강제 + FAISS 프리로드
1. kei_client.py: Kei API가 마크다운 리스트(- ) 접두사로 JSON 응답 시 전처리하여 파싱
2. image_utils.py: base_path+상대경로 이중 시 파일명 rglob 재탐색
3. design_director.py:
   - conclusion 꼭지 → footer zone + conclusion-accent-bar 코드 레벨 강제
   - _validate_height_budget(): zone별 height_cost 합산 검증, 초과 시 큰 블록 자동 교체
   - Opus 추천 프롬프트에 zone 배정 규칙 명시 (conclusion→footer 등)
4. main.py: 서버 startup 시 FAISS 인덱스 + bge-m3 모델 미리 로드

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 19:15:28 +09:00
9bd9dad9ac IMPROVEMENT Phase A~D + Phase 2 전체 반영
## IMPROVEMENT (Phase A~D)
- A-1: 4단계 Sonnet 디자인 조정 (_adjust_design) — CSS 변수 cascade
- A-2: 5단계 HTML 전문 프롬프트 전달
- A-3: shrink/expand 하드코딩 제거 → Sonnet target_ratio 기반
- A-4: rewrite action 구현
- A-5: overflow: visible (area 레벨 텍스트 잘림 방지)
- A-6: object-fit cover → contain (이미지 crop 방지)
- A-7: table-layout: fixed
- A-8: container query 폰트 스케일링
- B-1: details-block 템플릿 신규 (CSS 변수만 사용)
- B-2: 인쇄 시 details 자동 펼침 JS
- B-3: catalog에 details-block 등록
- B-4/B-5: images[]/tables[] 상세 판단 + fallback 3곳 동기화
- B-8: fallback card-grid → topic-header + char_guide 제거
- C-1: CLAUDE.md gradient 원칙 완화
- C-3: border-radius 9개 파일 var(--radius) 통일
- C-4: box-shadow 2레벨 → 1레벨
- D-0: 이미지 경로 입력 UI + API base_path
- D-1: Pillow 의존성 + image_utils.py
- D-2~D-4: 이미지 비율/축소방지 프롬프트 전달
- D-5: HTML에 이미지 base64 삽입

## Phase 2 (다른 Claude 작업)
- P2-A: FAISS 블록 검색 (bge-m3, 46개 블록)
- P2-B: SVG N개 자동 배치 (svg_calculator.py)
- P2-C: Opus 블록 추천 (Kei API 경유)
- P2-D: 5단계 재검토 루프 강화 (MAX_REVIEW_ROUNDS=2)
- P2-E: details-block fallback 연동

## 버그 수정 (BF-8~10)
- BF-8: 컨테이너 예산 기반 블록 배치
- BF-9: grid와 Sonnet 역할 분리
- BF-10: catalog mtime 캐시 자동 갱신

## 블록 라이브러리
- 46개 블록 (6 카테고리), catalog/BLOCK_SLOTS/INDEX 동기화
- 구 블록 제거 (quote-block, card-grid, comparison)
- 13개 _legacy 블록 보존

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 18:40:20 +09:00
7b034b04b6 Kei API 연동 복구 + 실장 정보구조 분석 + 팀장 role 기반 배치
1단계 (실장):
  - Kei API 연동 복구 (타임아웃 무제한, Kei persona 사고)
  - 정보 구조 파악 단계 추가 (본문 흐름 vs 참조 분리)
  - 각 꼭지에 role(flow/reference) 부여
  - fallback: Anthropic 직접 호출 (info_structure + role 포함)

2단계 (팀장):
  - info_structure + role 기반 배치 규칙 추가
  - flow → 좌측/메인, reference → 우측/사이드
  - detail_target → 본문 제외
  - 중복 방지 규칙

파이프라인:
  - pipeline.py import re 추가

Figma 관련 (다른 Claude Code 작업분):
  - catalog.yaml, figma-screenshots, figma-analysis, 테스트 HTML

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:33:17 +09:00
c42e65fc7e Initial commit: Kei Design Agent
콘텐츠를 시각적으로 구조화된 슬라이드 HTML로 변환하는 독립 에이전트.

아키텍처 (4단계 파이프라인):
  1. Kei 실장 (Opus) — 콘텐츠 유형 분류 + 블록 배치
  2. 디자인 팀장 (Sonnet) — 레이아웃 컨셉 (블록 배치 + 페이지 수)
  3. 텍스트 편집자 (Sonnet) — 슬롯 텍스트 정리 (핵심 유지)
  4. CSS Grid 렌더러 — HTML 조립

블록 템플릿 7종:
  comparison, card-grid, relationship, process,
  quote-block, conclusion-bar, comparison-table

기술 스택:
  FastAPI + Anthropic API + Jinja2 + CSS Grid
  Pretendard Variable 한국어 폰트

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:25:47 +09:00