From cbbc16386092c5ce26138015b9030031b9ee9809 Mon Sep 17 00:00:00 2001 From: kyeongmin Date: Tue, 19 May 2026 09:33:34 +0900 Subject: [PATCH] =?UTF-8?q?docs(IMP-18):=20Phase=20Z=20SVG=20gap=20report?= =?UTF-8?q?=20=E2=80=94=20doc-only=20carve-out?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit u1: docs/architecture/IMP-18-SVG-GAP-REPORT.md (NEW, 64 lines) 4 axes: Phase R' _preprocess_svg_data source refs (renderer.py:169-207, svg_calculator.py:15-156); Phase Z 15-partial SVG absence (grep documented + gap-doc link appended. Phase R' source (src/renderer.py, src/svg_calculator.py) and 15 Phase Z partials remain unmodified. IMP-18 is dormant reference axis; activation gated on IMP-04 registering an SVG-bearing partial. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/architecture/IMP-18-SVG-GAP-REPORT.md | 64 +++++++++++++++++++ .../PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md | 2 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 docs/architecture/IMP-18-SVG-GAP-REPORT.md diff --git a/docs/architecture/IMP-18-SVG-GAP-REPORT.md b/docs/architecture/IMP-18-SVG-GAP-REPORT.md new file mode 100644 index 0000000..c9ee807 --- /dev/null +++ b/docs/architecture/IMP-18-SVG-GAP-REPORT.md @@ -0,0 +1,64 @@ +# IMP-18 — Phase Z SVG Coordinate Pre-compute Gap Report + +**Status**: documented (reference-only, dormant) +**Scope**: doc-only. No runtime surface modified. +**Related issue**: https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2/issues/18 +**Soft dependency**: IMP-04 (frame_partials registration) — IMP-18 activates only when a SVG-bearing partial lands under `templates/phase_z2/`. + +--- + +## A1 — Phase R' source pattern (read-only reference) + +Phase R' implements SVG coordinate pre-compute as a renderer hook. References (do **not** modify): + +- `src/renderer.py:169-207` — `_preprocess_svg_data(block_type, block_data)` — mutates `block_data` with computed coordinates when `block_type` ∈ `SVG_BLOCKS`; warns and falls back on exception. +- `src/renderer.py:175` — `SVG_BLOCKS = {"venn-diagram", "relationship"}` — exhaustive type allow-list. +- `src/renderer.py:321` — call site inside `render_multi_page()` (`block_data = _preprocess_svg_data(block_type, block_data)`), right before `_resolve_template_path` lookup. +- `src/svg_calculator.py:15-156` — five helpers: + - L15 `calc_circle_positions(n, center_x, center_y, radius)` — 12 o'clock clockwise N-element layout. + - L47 `calc_item_radius(n, base_radius=75.0)` — auto-shrink small-circle radius for crowding. + - L59 `calc_orbit_radius(n, base_orbit=120.0)` — auto-expand orbit for crowding. + - L70 `calc_outer_radius(n, orbit_radius, item_radius)` — outer enclosing circle, 40 px margin. + - L77 `prepare_venn_data(items, center_label, center_sub, description, viewbox_width=600.0, viewbox_height=550.0)` — top-level entry; mutates `items[*].cx/cy/r` and returns `outer_r`/`center_x`/`center_y`/`viewbox_width`/`viewbox_height`. + +## A2 — Phase Z partial SVG inventory (gap) + +Phase Z active partials surface: + +- `templates/phase_z2/families/*.html` — **13** files. +- `templates/phase_z2/frames/*.html` — **2** files. +- Total surface = **15 partials**. + +SVG usage scan (evidence): `rg "` / `viewBox` insertion in IMP-18 scope. SVG-bearing partial onboarding is owned by IMP-04. +- F12 `construction_goals_three_circle_intersection.html` HTML/CSS → SVG migration is **out of scope** (separate post-IMP-04 issue). +- No hardcoded SVG coordinates in Phase Z templates — when IMP-18 re-activates, coordinates must be derived from `svg_calculator` helpers (or equivalent forward-port into `phase_z2_renderer`), not hand-copied. + +--- + +## Re-activation checklist (future) + +When IMP-04 introduces the first SVG-bearing Phase Z partial: + +- [ ] Identify partial(s) consuming `items[*].cx/cy/r` + `outer_r` + `viewbox_*`. +- [ ] Decide port target — extend `phase_z2_renderer` with a `_preprocess_svg_data` analog, or reuse `src/svg_calculator.py` directly. +- [ ] Keep Phase R' references untouched. +- [ ] Add anchor SHA bump only if runtime source surface changes. diff --git a/docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md b/docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md index a3e043c..bb6d646 100644 --- a/docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md +++ b/docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md @@ -66,7 +66,7 @@ | IMP-15 | Step 14 visual_check 보강 | Step 14, 21 | §3 H1 Reference Only | medium | image_aspect_mismatch / tabular_overflow 검사 추가 | AI/Kei classification 회귀 X / deterministic 검사 + trace | soft link: IMP-01 (Step 14 측정/trace layer 공유) | pending | | IMP-16 | B-2 verification 보조 axis | Step 1, 2, 14, 21, 22 | §3 H3 Reference Only | ↓ low | B-2 reverse path 의 verification 보조. main reverse path 는 IMP-07, 본 issue 는 text/visual/trace 검증 layer | AI/Kei verification 회귀 X / utility deterministic | hard link: IMP-07 (B-2 main 활성 시점 의미) | pending | | **IMP-17** | **AI repair fallback infra** (**carve-out — normal path 밖**) | Step 12, 16, 17 | §3 G3 | (별 axis priority — pending) | [carve-out boundary + activation gate](IMP-17-CARVE-OUT.md) (3-cond AND: User GO ∧ B4 frame_selection evidence ∧ IMP-04/05 live — full def in u2 doc) — `httpx` + SSE streaming + retry + JSON parse pattern reference — light_edit / restructure proposal | **normal path AI 호출 0 — 본 axis = fallback only, normal path 와 분리 설계** / Kei persona 단절 (Phase Q 자산과 단절) | soft link: IMP-04 + IMP-05 (catalog 확장 + V4 fallback 활성 시 의미) | pending | -| IMP-18 | I3 SVG 좌표 보강 | Step 0, 9 | §3 Reference Only | ↓ low | `renderer._preprocess_svg_data` 패턴 reference — frame_partials SVG 좌표 사전 박힘 | Phase R' (renderer.py) 회귀 X | soft link: IMP-04 (frame_partials 등록 후 의미 ↑) | pending | +| IMP-18 | I3 SVG 좌표 보강 | Step 0, 9 | §3 Reference Only | ↓ low | `renderer._preprocess_svg_data` 패턴 reference — frame_partials SVG 좌표 사전 박힘 — [gap report](IMP-18-SVG-GAP-REPORT.md) | Phase R' (renderer.py) 회귀 X | soft link: IMP-04 (frame_partials 등록 후 의미 ↑) | documented | | IMP-19 | I4 zone 비중 분배 | Step 8 | §3 Reference Only | ↓ low | `renderer._group_blocks_by_area` 패턴 reference — zone-level ratio 분배 | Phase O 컨테이너 회귀 X / 직접 통합 X | soft link: IMP-09 (zone 비중 분배 영역 공유) | pending | | IMP-20 | H2 frame contract validation | Step 10 | §3 Reference Only | ↓ low | `content_verifier.verify_structure` pattern reference — Phase Z frame contract 검증 pattern | Phase Q `REQUIRED_PATTERNS` 값 회귀 X / Phase Z 자체 pattern dict 설계 | soft link: IMP-04 (확장 catalog 적용 시 검증 범위 확대) | pending |