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>
5.0 KiB
IMP-18 — Phase Z SVG Coordinate Pre-compute Gap Report
Status: documented (reference-only, dormant)
Scope: doc-only. No runtime surface modified.
Related issue: #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)— mutatesblock_datawith computed coordinates whenblock_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 insiderender_multi_page()(block_data = _preprocess_svg_data(block_type, block_data)), right before_resolve_template_pathlookup.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; mutatesitems[*].cx/cy/rand returnsouter_r/center_x/center_y/viewbox_width/viewbox_height.
- L15
A2 — Phase Z partial SVG inventory (gap)
Phase Z active partials surface:
templates/phase_z2/families/*.html— 11 contracted + 2 WIP untracked = 13 on disk (contracted set =templates/phase_z2/catalog/frame_contracts.yamltop-level keys; WIP allowlist =templates/phase_z2/families/_WIP_FILES.md, gated on Gitea #42 / #52 F-2 option (c)).templates/phase_z2/frames/*.html— 2 files.- Total surface = 13 active partials (11 contracted families + 2 frames) + 2 WIP untracked families (15 on disk; runtime matcher consumes the contracted set only).
SVG usage scan (evidence): rg "<svg|viewBox" templates/phase_z2/ → 0 matches (exit 1).
Closest geometric candidate is templates/phase_z2/families/construction_goals_three_circle_intersection.html (frame_id 1171281189, "cycle-3way-intersection" intent), but it renders three intersecting circles via HTML/CSS — border-radius:50% + linear-gradient + ::before outer ring — not SVG. The Figma source's six accent kanji circles, six side labels, three decorative rects, and three arcs are explicitly NOT PROMOTED at the partial header (compact MDX-mapped focus). No partial currently demands the pre-computed items[*].cx/cy/r contract.
A3 — IMP-04 activation gate (soft dependency)
IMP-18 has no Phase Z runtime consumer today. Re-activation triggers:
- IMP-04 (frame_partials registration) lands an SVG-bearing partial under
templates/phase_z2/(e.g., a venn-diagram or relationship frame promoted from Figma). - The partial declares slots that consume
items[*].cx/cy/r+outer_r+viewbox_*(theprepare_venn_datareturn contract).
Until both conditions hold, IMP-18 stays dormant and this gap report is the sole deliverable.
A4 — Phase R' guardrail (read-only lock)
Per CLAUDE.md Phase R' regression prevention rules and the Stage 1/2 exit reports:
src/renderer.py— read-only. No edit to_preprocess_svg_databody,SVG_BLOCKSset, orrender_multi_pagecall site.src/svg_calculator.py— read-only. No edit to the five helpers or their public signatures.templates/phase_z2/families/*.html(11 contracted + 2 WIP untracked = 13 on disk; WIP set =_WIP_FILES.md) +templates/phase_z2/frames/*.html(2) — no<svg>/viewBoxinsertion in IMP-18 scope. SVG-bearing partial onboarding is owned by IMP-04. The 2 WIP family templates are gated on Gitea #42 (promote-or-remove) and remain outside the runtime matcher set per #52 F-2 option (c).- F12
construction_goals_three_circle_intersection.htmlHTML/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_calculatorhelpers (or equivalent forward-port intophase_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_rendererwith a_preprocess_svg_dataanalog, or reusesrc/svg_calculator.pydirectly. - Keep Phase R' references untouched.
- Add anchor SHA bump only if runtime source surface changes.