# 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.