15ef7c65e9f58637e4b4714afb9546c176ceaaa8
100
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
15ef7c65e9 |
fix(#75): IMP-47A mdx03 frontend execution stabilization (u1~u4)
u1: SlideCanvas iframe sandbox += allow-scripts (allow-same-origin preserved)
→ embedded-mode script in slide_base.html now applies html.embedded
→ standalone CSS reset deactivates inside iframe; no clipping
u2: designAgentApi.loadRun merges candidate_evidence + v4_all_judgments
+ v4_candidates via Map<template_id|id|frame_id> dedup,
LABEL_PRIORITY (use_as_is<light_edit<restructure<reject) then
confidence desc, capped TOP_N_FRAMES=6
u3: Home.handleGenerate useCallback deps = [uploadedFile, slidePlan,
userSelection, pendingZones, pendingLayout] (5-tuple, stale-closure fix)
u4: tests/manual/imp47a_e2e.md — mdx03 manual e2e spec (5 axes)
Frontend-only. Backend src/ untouched. No template/catalog edits.
Determinism preserved (no LLM in frontend merge logic).
Baseline: pytest -q tests → 623 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
c864fe0479 |
feat(#61): IMP-33 AI fallback scaffolding (u1~u11, flag default OFF)
Frame-aware AI fallback module scaffolded under src/phase_z2_ai_fallback/ with master flag ai_fallback_enabled=False; normal-path AI call count remains 0. AI output constrained to builder_options_patch / partial_overrides / slot_mapping_proposal; MDX / frame_id / raw HTML / raw CSS mutations rejected at schema layer. IMP-46 cache gate (cache.py) raises AiFallbackCacheGateError unless visual_check_passed AND user_approved. Step 12 wires AI repair after IMP-30 provisional payload only; Step 17 stays blocked behind IMP-34 / IMP-35 prerequisites. AST isolation guard forbids fallback package from importing Phase Q / Kei / pipeline runtime symbols. Docs IMP-17 / IMP-31 bound to runtime module surface via 11-row structural test pin (test_docs_sync.py) so drift fails CI. Tests: 116 fallback / 161 phase_z2 regression / 526 scoped full sweep all passing. Existing pre-IMP-33 fixture issue in scripts/test_phase_t_* remains untouched (out of scope). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
c412f1ea75 |
refactor(#41): IMP-32 Step 9 application_plan helper extraction (u1~u5)
Pure refactor — extract inline Step 9 per-unit application_plan dict
assembly into module-level private helpers for testability. Replaces
IMP-05 Case 7 inspect.getsource() literal guard with direct helper-call
shape test. Behavior preserved: key set/order, candidate_evidence +
fallback_chain compat alias identity, IMP-06 additive plan fields,
IMP-11 D-2 markers (single _contract = get_contract(c.template_id)
bind + catalog_registered + min_height_px chain).
- u1 _application_candidates_for_unit(unit) at src/phase_z2_pipeline.py
:2829-2853 — APPLICATION_MODE_BY_V4_LABEL mapping (pure extraction)
- u2 _v4_all_judgments_for_unit(v4_all_for_unit) at :2855-2882 —
IMP-11 D-2 chain preserved literally
- u3 _build_application_plan_unit(unit, zone_plan, selection_trace,
plan_record, v4_all_for_unit, layout_preset, layout_candidates_list)
at :2885-2995 — byte-identical per-unit dict (key set + order +
value identity), candidate_evidence / fallback_chain compat alias,
v4_candidates list, v4_all_judgments, application_candidates, IMP-06
additive plan fields
- u4 Step 9 inline loop body at :4620-4658 replaced with helper call;
per-index/per-id lookups (zone_region_plans[i], v4_fallback_traces
.get(...), plan_record_by_unit_id.get(id(unit)), section_alias_by_id,
lookup_v4_all_judgments(...)) stay at call-site
- u5 tests/test_phase_z2_v4_fallback.py Case 7 rewritten to
test_build_application_plan_unit_emits_candidate_evidence_and_alias
— direct helper call with SimpleNamespace duck-typed input; asserts
candidate_evidence list identity (is), fallback_chain compat-alias
identity (is), key order (candidate_evidence before fallback_chain),
and compat-alias comment scoped to inspect.getsource(_build_
application_plan_unit)
Verification: targeted 22 passed, full pytest 408 passed (0 fail/skip),
smoke 11/11 PASS (2 pre-existing baseline SKIPs unchanged).
Cross-ref: IMP-05 (#5) commit
|
||
|
|
182aa7c47f |
docs(#40): IMP-31 gate audit + activation reference cross-link
- u1: IMP-17-CARVE-OUT.md anchor cite :564 -> :570/:572/:575/:580/:664 - u2: new IMP-31-GATE-AUDIT.md (3-cond AND gate state + 8 issue-body axes) - u3: backlog row + status-board section 5 cross-ref to audit doc (no verdict dup) doc-only. no src/ templates/ tests/ touched. src/phase_z2_ai_fallback/ not created. |
||
|
|
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. |
||
|
|
b4872ba6ce | feat(#38): IMP-29 frontend zone-level evidence bridge (candidate_evidence reader + types + UI) | ||
|
|
265d70ed91 |
refactor(#28): IMP-28 L4 _parse_json dedup (4 modules -> src/json_utils)
Consolidate duplicate _parse_json helpers from content_editor.py /
design_director.py / kei_client.py (fuller form) and pipeline.py (simple form)
into shared src/json_utils.parse_json (strict superset). All 18 call-sites
preserved via `parse_json as _parse_json` alias import; no behavior change.
- src/json_utils.py (new): shared helper, fenced/plain-fence/bare-brace patterns
+ list-prefix cleanup fallback.
- tests/test_json_utils.py (new): 9 unit tests pinning parser semantics.
- src/content_editor.py / design_director.py: remove local helper +
unused `import json` / `import re`.
- src/kei_client.py / pipeline.py: remove local helper; `json` / `re` retained
(used elsewhere).
Targeted tests 9 passed; full pytest 374 passed (3 pre-existing scripts/
collection errors reproduce on baseline
|
||
|
|
909bf75edc |
refactor(#27): IMP-27 K5 catalog loader + _get_block_by_id cleanup
Consolidate three duplicated catalog readers and two _get_block_by_id implementations behind a single shared module (src/catalog.py) that owns file-read + mtime cache. All caller signatures and return contracts remain byte-identical. Units: - u1 NEW src/catalog.py (76 lines): load_root_catalog / load_blocks / get_block_by_id / get_catalog_mtime as the sole file-read + mtime-cache owner. - u2 src/block_reference.py: _load_catalog delegates to load_blocks (list[dict] preserved); _get_block_by_id (no-arg) delegates to catalog.get_block_by_id. Module-level _catalog_cache removed. - u3 src/block_selector.py: load_catalog delegates to load_root_catalog (root dict preserved); _get_block_by_id (catalog-injected sig preserved) delegates to catalog.get_block_by_id. Module-level _catalog_cache / _catalog_mtime / CATALOG_PATH removed. - u4 src/renderer.py: _load_catalog_map and _load_catalog_map_with_variants consume catalog.load_blocks; renderer projection caches kept local but keyed via catalog.get_catalog_mtime(). Per-projection invalidation keys (_CATALOG_MAP_MTIME / _CATALOG_VARIANT_MAP_MTIME) introduced. import yaml, CATALOG_PATH, legacy _CATALOG_MTIME removed. - tests NEW tests/test_catalog_shared_loader.py (421 lines, 23 cases): shared loader + 3 wrappers covering single file-read, contract preservation, signature preservation, shared cache, private state absence, mtime invalidation propagation to renderer projections. Verification: - pytest tests/test_catalog_shared_loader.py -v: 23/23 PASS in 0.13s. - pytest tests/ -q --ignore=tests/matching: 365/365 PASS in 38.10s. - src/fit_verifier.py, src/space_allocator.py, src/pipeline.py and templates/catalog.yaml unchanged (git diff empty). Out of scope: - catalog.yaml schema/path unchanged. - Catalog direct-read call sites in fit_verifier / space_allocator / pipeline left for a separate follow-up axis. - Phase Z 22-step runtime, frame_selection, light_edit/restructure flows untouched. Refs: IMP-27 (gitea #27), INSIGHT-MAP §5 K5, PHASE-Q-AUDIT §2.10 |
||
|
|
2896bb691c |
docs(#26): IMP-26 J3 status pending->deferred + dual-precondition trigger
BACKLOG line 93 + INSIGHT-MAP line 150 (verbatim mirror per anchor sync rule). Trigger axis now requires both Phase R' archive trigger AND §2.1/§2.2 SoT signature unification to keep guardrail = code-removal-only. No source files touched. |
||
|
|
a71355e005 | docs(#25): PHASE-Q-AUDIT §1 lens B-1 row candidate-file 칸 정정 | ||
|
|
b1897c01bc |
docs(#24): PHASE-Q-AUDIT §1 lens A-2 row candidate-file 칸 정정
block_reference.py, block_selector.py 를 간접 reference (catalog 로딩 / block 검색 패턴) 로 재분류. A-2 main = frame_contracts.yaml + frame_partials 신규 구축 (Phase Q catalog schema ≠ Phase Z) 임을 명시. §2.10 K6 + §3-A 1242 binding SoT 와 정합. IMP-22 / IMP-23 A-3/A-4 lock 패턴 추종. |
||
|
|
5d23b747ff |
fix(orchestrator): P5b first-line agent header strict + supplement throttle
Bug discovered during #24 IMP-24 K6 Stage 2 (2026-05-20): - Codex r1, r2, r3 started with '=== IMPLEMENTATION_UNITS ===' on first line (not '[Codex #N] ...'), so detect_agent (P0-1 strict, first-line only) returned None. - For non-audit issues, the P5 supplement guard was audit-only gated → silent loop until Codex r4 happened to use correct format. 4 rounds wasted. Verified that #21 Stage 4 had the same latent silent loop pattern ('## [Codex #1]' first line) — orchestrator looped through ~10 Claude rounds before random recovery. P5b fix addresses this long-standing bug. Patch (defensive parser-contract hardening; does not assume single root cause): 1. RULES global gets explicit "FIRST non-empty line MUST be [Claude #N] / [Codex #N]" rule that OVERRIDES any stage-specific "body MUST contain" constraint. 2. COMPACT_PLAN_RULE wording clarified: "body" begins AFTER the first-line agent header. The 'body MUST contain ONLY' set no longer accidentally permits '=== IMPLEMENTATION_UNITS ===' on line 1. 3. is_codex None supplement guard: - audit-only gate REMOVED → fires for all issues (#24 latent loop fixed) - Throttle: max 2 supplements per stage; on 3rd violation, orchestrator hard-stops the issue with explicit "user action required" message and exits run_stage cleanly - Supplement message names both Claude AND Codex (Claude's first-line violation also breaks downstream via Codex mimicry) - Body-head 80 chars logged on detection failure (debugging aid) 4. Regression tests (+5 cases in test_orchestrator_core.py): - TestDetectAgent: '=== IMPLEMENTATION_UNITS ===' first line → None - TestDetectAgent: [Codex #N] first line + units after → 'codex' OK - TestDetectAgent: '## ', '📌 **', '**' prefix all → None - TestRulesAndCompactPlanFirstLineContract: RULES wording has FIRST/OVERRIDES - TestRulesAndCompactPlanFirstLineContract: COMPACT_PLAN_RULE has carve-out Cosmetic side effect (accepted): Claude's '📌 **[Claude #N] ...**' or '## [Codex #N] ...' decoration prefixes will fail detect_agent. Agents will drop decorations from line 1; line 2+ can still use them. Out of scope (NOT included to keep regression risk low): - detect_agent function logic UNCHANGED (P0-1 strict preserved) - consensus parser UNCHANGED - stage loop structure UNCHANGED - git/Gitea retrieval logic UNCHANGED - audit-only mode P4/P4a guards UNCHANGED - pre-post comment validation (future axis, larger refactor) Total: 131/131 pytest pass (126 prior + 5 new). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
447e702520 |
docs(#23): PHASE-Q-AUDIT §1 lens A-3/A-4 html_generator 칸 정정
§1 lens A-3 / A-4 candidate-file column에서 bare html_generator.py token 제거. §2.9 J5 (L979–981) SoT가 두 행 모두 부정확으로 lock — A-3는 html_generator에 selenium import 부재, A-4는 slide-base 호출 부재 (area HTML만 반환). IMP-22 ( |
||
|
|
2ace54bce1 |
docs(#22): PHASE-Q-AUDIT §1 lens A-3/A-4 renderer 칸 정정
A-3 main = slide_measurer.capture_slide_screenshot; renderer.py 는 간접 (render-path 자료); "selenium 캡처 흔적 추정" 제거. A-4 = renderer.py (legacy slide-base.html 호출 지점 보유, embedded/standalone CSS 분기 미구현) 추가. html_generator.py token 양 행 보존 (IMP-23 boundary). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
5590ef20b5 |
docs(#21): PHASE-Q-AUDIT §1 lens B-1/B-2 content_editor.py 오기재 제거
§1 lens 표 B-1 행(L104) "Phase Q 후보 파일" 칸 — content_editor.py 토큰 제거 (pipeline.py 보존). §1 lens 표 B-2 행(L105) "Phase Q 후보 파일" 칸 — content_editor.py 토큰 제거 (글벗 fmt_slide.py html_to_slide_mdx 보존). §2 모듈 리스트 L125 content_editor.py 항목의 (B-1, B-2) axis annotation 제거 (모듈 자체는 §2.6 audit 대상으로 유지). 근거: content_editor.py = slot-fill / Kei editor only (fill_content :73, fill_candidates :335). B-1 (zone-section override) = pipeline.py / composition planner 영역. B-2 (HTML→MDX 역변환) = 글벗 fmt_slide.py html_to_slide_mdx (외부 sibling). 로컬 src/phase_z2_verification_utils.py 는 B-2 검증 utility 만 (extract_text_from_html L64-73 / normalize_for_comparison L89-104 / strip_meta_lines L147-166). §2.6 G2 self-catch (L642-643, L679) 와 정합. Scope: docs-only, 1 file changed, 3 insertions(+) / 3 deletions(-). src/ templates/ frontend 무변경. IMP-25 (pipeline.py B-1 precision 축) / 외부 fmt_slide.py reference 축 / content_editor archive verdict (§2.6) / PHASE-Q-INSIGHT-TO-22STEP-MAP.md:136 catch record 모두 보존. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
134f52d3d3 |
feat(#58): L3 dormant trigger guard -- DORMANT-TRIGGERS.yaml + checker + orchestrator hook
P5-1 docs/architecture/DORMANT-TRIGGERS.yaml -- 5 entries (IMP-16/17/18/19 active + IMP-20 followup-linked #55). P5-2 scripts/check_dormant_triggers.py -- standalone, reads registry, scans tree + diff, writes .orchestrator/dormant_alerts.json, exit 0 always. P5-3 orchestrator.py -- _check_dormant_triggers() helper + Stage 4->5 informational alert branch (skips audit-only, never blocks). P5-4 tests/orchestrator_unit/test_dormant_triggers.py -- 30 cases (yaml schema, registry contents, checker matching, false-positive guards, manual-evidence skip, orchestrator branch, audit bypass, governance ref). P5-5 PROJECT-INTENT-AND-GOVERNANCE.md -- single anti-patterns row referencing the L3 registry as binding contract surface. Tests: pytest -q tests = 337 passed (baseline 307 + 30 new). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
8c1e56366b |
docs(#57): INTEGRATION-AUDIT-02 doc-sync banner on IMP-16-U2-WIRING-DESIGN
IMP-16 = documented:dormant, IMP-07 = documented:no-runtime. Banner is additive-only (9 lines, +0 deletions); existing L2-L75 contract preserved byte-identical. Resolves issue #57. Refs: INTEGRATION-AUDIT-02-REPORT.md Sections 3, 4, 7 (final decision: NEEDS_DOC_SYNC_FOLLOWUP) |
||
|
|
101143e67b | docs(#56): INTEGRATION-AUDIT-02 + backlog L51/L67 -- IMP-07 no-runtime / IMP-16 dormant | ||
|
|
9389b8425b |
fix(orchestrator): P5 audit-anchor-first-line regression guard
Bug discovered during #56 INTEGRATION-AUDIT-02 execution (2026-05-20): - Both Claude and Codex put "Audit anchor: ..." as the FIRST line of every Gitea comment per the #56 issue body instruction "cite anchor at start of every stage". - detect_agent (P0-1 strict, first-line only) then returns None for these comments because the first line is "Audit anchor:..." not "[Codex #N]" or "[Claude #N]". - Result: orchestrator's "is_codex" check (line ~1288) flips false → "Codex 응답 미감지 — continuing" → infinite Stage 4 loop. #56 reached Round #14 (>300 comments, ~2 hours wasted token). Fix path (NOT relaxing detect_agent — that would revive the original #45 pre-P0-1 bug where [Claude #N] citations inside Codex bodies caused mis-detection): 1. AUDIT_ONLY_NOTE updated to enforce comment format: - FIRST non-empty line MUST be `[Claude #N] <stage>` or `[Codex #N] <stage>` - Audit anchor / banners / prefaces MUST appear line 2 or later - Concrete CORRECT example included - Explicit warning that violation breaks stage advance 2. is_codex None guard auto-supplements: - When _audit_mode(title) AND detect_agent returns None, orchestrator posts a Gitea supplement comment requesting the correct format - Next round's Claude/Codex see the supplement and correct - Breaks the infinite loop automatically (no manual ctrl-C needed) 3. Regression tests in TestDetectAgent (test_orchestrator_core.py): - test_audit_anchor_preface_breaks_detection: confirms P0-1 strict correctly returns None when anchor is first line - test_audit_anchor_after_header_works: correct format passes Total: 96/96 pytest pass (94 prior + 2 P5 regression). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
47f072ee05 |
docs: PROJECT-INTENT-AND-GOVERNANCE master doc
프로젝트의 왜 / 무엇을 위해 / 어떻게 라는 질문에 대한 master 답. 이 문서가 있으면 매번 처음부터 framing 설명할 필요 없음. 구조: 1. Destination — Phase Z 22-step + AI zone-fit frame generation 2. Q~Y 검토 = 이미 완료 (과거형). 결과 = INSIGHT-MAP + 28 초기 이슈. 3. INSIGHT-MAP catalog 구조 (§0~§5) 4. IMP 이슈 좌표 체계 (관련 step + source + priority + scope + guardrails) 5. orchestrator 의 disciplined executor 역할 (Claude + Codex 합의) 6. Audit cycle (meta-governance) — 발견은 follow-up 이슈로 분리 7. 도착점 도달 기준 5 항목 8. 자주 헷갈리는 anti-patterns (heritage 보존 X, MDX 최적화 X 등) 9. 핵심 참조 문서 인덱스 10. 한 줄 요약 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
8c60f7cc85 | docs(IMP-20): frame contract validation reference + cross-link -- documented-axis close | ||
|
|
e60aacc3dc |
docs(IMP-19): zone ratio reference + cross-link -- documented-axis close
Stage 5 commit for IMP-19 (gitea #19) — docs-only, no runtime surface. - new: docs/architecture/IMP-19-ZONE-RATIO-REFERENCE.md (header + A1 consumer + A2 producer + A3 Phase Z solver delta + A4 IMP-09 boundary + A5 re-activation gate / GR1-GR4). - update: PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md — IMP-19 row pending -> documented + reference doc link; IMP-09 row carries soft back-link to the IMP-19 reference doc. - update: PHASE-Q-INSIGHT-TO-22STEP-MAP.md §3 I4 row — prepend IMP-19 anchor + reference doc link (step/classification preserved). Guardrails (Stage 1/2 binding contract): src/ untouched, no role-based ["배경","본심"] hardcoding into Phase Z, IMP-09 solver ownership preserved, soft-link integrity holds. IMP-19 remains dormant until the A5 gate fires. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
02e2ae0afb |
docs(#54): F-4 legacy annotation + F-5 fixture convention -- AUDIT-01 housekeeping
INTEGRATION-AUDIT-01 (#50) §10.4 / §10.5 housekeeping carry-over. F-4: annotate 14 remaining legacy Phase R'/Q sample-text hits across 10 src/ files with inline marker `# [legacy Phase R'/Q example -- INTEGRATION-AUDIT-01 §10.4]`. Comment-only. No string-literal / regex / sample dict value mutated. fit_verifier.py L612 marker keeps Phase Z partial-live import graph (FitAnalysis / RoleFit / redistribute / salvage) byte-precise. F-5: docs-only addendum -- §10.5.1 in INTEGRATION-AUDIT-01-REPORT.md + tests/CLAUDE.md fixture convention note. No root tests/fixtures/ dir created; existing tests/phase_z2/fixtures/ convention preserved. Documents test-only sample-reference allowance vs src/** runtime prohibition. Out of scope: Phase Z source 11 hits (phase_z2_content_extractor / failure_router / mapper / retry), production behavior change, #19 work. Verified: pytest -q tests/phase_z2/ = 157 PASS. git diff +210/-0 (35 src/docs lines + 175 new tests/CLAUDE.md). No behavioral delta. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
191b6a9d85 |
docs(IMP-53): resolve audit charter F-1 -- C3 producer path
Annotate `INTEGRATION-AUDIT-01-REPORT.md` §5.1 row C3 with an inline correction pointer noting that the historical charter cites `src/phase_z2_mapper.py + consumers` but the live `fit_classification` producer is `src/phase_z2_classifier.py`. Stamp §5.4 F-1 surface-note and §10.1 F-1 heading as `RESOLVED via IMP-53 (2026-05-19)`. Documentation-only change. Runtime / templates / catalog / MATRIX / OVERVIEW untouched. Historical §5.1 C3 quote preserved verbatim per anchor_sync_rules. pytest -q tests = 303 passed (baseline parity). Refs IMP-53 (F-1) -- gitea issue #53 |
||
|
|
2bb0acac19 |
docs(IMP-51): reconcile Phase Z backlog status with audit-01 (F-3)
Per INTEGRATION-AUDIT-01 (#50) §6.2 / §9.3 cond.1 / §10.3: - §1 IMP-02..IMP-11: pending -> implemented (10 rows, BACKLOG_STALE flip) - §2 IMP-12..IMP-16: pending -> implemented (5 rows, BACKLOG_STALE flip) - §2 IMP-17: pending -> documented (deferred) (carve-out boundary preserved) - §2 IMP-18: documented unchanged (AGREE row) - §2 footnote: IMP-15 child issues note (#45 |
||
|
|
c37a554fb1 |
docs(IMP-50): backlog audit completion row for IMP-50
Append IMP-50 audit completion row referencing INTEGRATION-AUDIT-01-REPORT
(commit
|
||
|
|
8c7d6935b1 |
docs(IMP-50): Phase Z integration audit-01 — report-only carve-out
22 closed improvement issues × 22-step Phase Z pipeline audit. 4-axis verification: scope myopia, pipeline step mapping, cross-issue conflict, backlog ↔ code reality. Decision: CONDITIONAL GO for #19. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
e32f632464 |
fix(orchestrator): P4a baseline-diff guard + Stage 5 commit scope
P4 had two production issues blocking #50 integration audit deployment: 1. Stage 3 guard had no baseline awareness — flagged ALL forbidden-path changes including pre-existing dirty WIP. Empirical: 328 such files already in current working tree (tests/matching/ artifacts etc). #50 would have hit reject loops immediately without Claude doing anything wrong. 2. Stage 5 had no commit-scope guard — if Claude ran `git add -A` and committed user's existing WIP, audit commit would be polluted with unrelated production changes. P4a additions: - _audit_baseline_path / _ensure_audit_baseline / _load_audit_baseline: snapshot working-tree dirty paths at run_issue entry for audit issues. Resumed runs preserve existing baseline (no overwrite). - _check_audit_only_violations(baseline=None): accept baseline set, subtract from violations — only flags NEW forbidden changes introduced after audit start. - _check_audit_commit_scope: verify HEAD commit's file list matches AUDIT_ALLOWED_COMMIT_GLOBS (INTEGRATION-AUDIT-*.md, BACKLOG.md). - run_issue: save baseline on audit-mode entry only — no impact on normal issues. - Stage 5 (commit-push) YES gate: new guard rejects on out-of-scope files with remediation prompt (git reset --soft + force-with-lease). 19 new tests: - baseline subtraction (5): pre-existing removed, None=keep-all, empty-set=catch-all, full-coverage filter, Windows path normalize. - baseline persist (5): roundtrip, no-overwrite on resume, missing fallback, corrupt JSON fallback, non-list fallback. - commit scope detection (7): report-only allowed, backlog allowed, src/ rejected, unrelated docs rejected, git error fail-open, Windows backslash, empty commit pass. - allowed globs sanity (2): every glob has audit marker, all under docs/architecture/. Total: 94/94 pytest pass (75 prior + 19 new). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
4289a500b6 |
feat(orchestrator): P3 wrapper input/encoding fix + P4 audit-only mode
P3 hotfix (2026-05-18 — verified during #46 retry attempt): - _run_with_tree_kill: encode input only when Popen is in binary mode. Previously force-encoded str→bytes even with encoding= set, breaking text-mode stdin pipes with: write() argument must be str, not bytes. - run_claude path was the only affected call site. - 3 new C7 regression tests (input+encoding / bytes+binary / auto-encode). - C3/C6 test fixtures hardened with DEVNULL stdio isolation. P4 audit-only mode (2026-05-19, prep for #50 integration audit): - _is_audit_issue: title-based detection for [INTEGRATION-AUDIT*], [AUDIT-ONLY], or "integration audit" phrase. - _audit_mode + --audit-only CLI flag: manual override regardless of title. - AUDIT_ONLY_NOTE injected into context pack across all stages/rounds. - Stage 3 (code-edit) YES gate: deterministic git status check. Changes touching src/**, templates/**, tests/** auto-reject Stage 3 YES and post a supplement-request comment. LLM-independent enforcement. - 26 new audit-mode tests (title detection, CLI override, forbidden prefix detection, allowed paths pass, Windows backslash normalization, quoted paths with spaces, git error fail-open, constants sanity). Total: 75/75 pytest pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
cbbc163860 |
docs(IMP-18): Phase Z SVG gap report — doc-only carve-out
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 <svg|viewBox = 0); IMP-04 activation gate; Phase R' read-only guardrail. u2: docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md L69 IMP-18 row: status pending -> 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) <noreply@anthropic.com> |
||
|
|
e10ec36617 |
feat(IMP-17): AI repair fallback infra carve-out — design-only boundary + 3-cond AND gate
u1 — src/phase_z2_pipeline.py:564 route hint comment corrected from non-existent IMP-31 to IMP-17 (carve-out, AI fallback only, normal path 밖). Line 565 IMP-29 frontend override reference untouched. u2 — docs/architecture/IMP-17-CARVE-OUT.md (new) defines: - allowed scope (Step 12 restructure proposal, Step 16/17 retry fallback) - forbidden scope (normal-path AI calls, MDX compression, HTML structure) - 3-condition AND activation gate (User GO ∧ B4 frame_selection evidence ∧ IMP-04 catalog + IMP-05 V4 fallback live) - pattern shape reference (link-only): content_editor.py:21,318 + sse_utils.py:16-50 (Phase Q Archive Candidate, no port) - AI 격리 contract + Kei persona 단절 (permanent) u3 — PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md:68 IMP-17 row gains carve-out doc link + 3-cond AND gate pointer. u4 — PHASE-Q-INSIGHT-TO-22STEP-MAP.md AI repair fallback infra registry row prefixed with IMP-17 + carve-out link; normal_path=no preserved. Anchor test: tests/orchestrator_unit/test_imp17_comment_anchor.py asserts line 564 IMP-17 wording AND line 565 IMP-29 preservation (2 tests pass). Runtime behavior change: 0. Only delta in executable file is one comment line. Normal-path AI invocation count remains 0. Refs: gitea #17 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
23ba8b68cd |
feat(IMP-16): U1 H3 verification utility port + U2 wiring design
U1 (runtime, u1-u10): new Phase Z-owned deterministic verification module src/phase_z2_verification_utils.py (335 LOC, stdlib only) porting H3 utility surface — VerificationResult, extract_text_from_html, normalize_for_comparison, extract_keywords, strip_meta_lines, split_into_sentences, verify_text_preservation, detect_invented_text. 10 unit tests under tests/phase_z2/test_pz2_vu_*.py (56 tests). u11 (design-only): docs/architecture/IMP-16-U2-WIRING-DESIGN.md fixes the Step 1/2/14/21/22 reverse-path contract, redesigned frame-contract pattern reservation (IMP-20), and IMP-07 hard-gate criteria. No runtime wiring lands in this commit — U2 stays blocked until IMP-07 reverse path is implemented + verified + runtime-hit. Guardrails: no src.content_verifier import; no FORBIDDEN_KEI_MEMOS / generate_with_retry / REQUIRED_PATTERNS / verify_structure / verify_area / verify_all_areas usage; no AI / Kei / httpx / SSE path; AI-isolation contract upheld (utility is deterministic). Tests: 56 targeted PASS (0.19s), 15 regression baseline PASS (7.59s). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
614c53358e |
feat(IMP-15): 실행-4 — debug.json event surfacing + spec taxonomy row
Issue: #48 (IMP-15 실행-4, axis 4: debug.json + spec doc trace). Parent: #15. Depends on 실행-1/2/3 (events + classifier outputs). Surfaces the image/table event streams that 실행-1/2/3 already produced and consumed, mirroring the existing `zone_geometries_px` top-level precedent (no new pattern introduced). Adds the matching taxonomy row to the Phase Z fit-classifier/router spec. src/phase_z2_pipeline.py (+3): - write_debug_json now lifts `image_events` and `table_events` to top-level of `debug.json` via `(visual_runtime_check or {}).get(<k>, [])`, exactly mirroring the immediately preceding `zone_geometries_px` surfacing line. Defaults to `[]` when `visual_runtime_check` is None — additive, no consumer-visible breakage. docs/architecture/PHASE-Z-FIT-CLASSIFIER-ROUTER-SPEC.md (+1): - §3.1 taxonomy adds `image_aspect_mismatch` row. Row text explicitly marks the signal as post-render `fail_reasons` from Step 14 visual_runtime_check (rendered vs declared aspect ratio mismatch), NOT a router-routed fit_classifier output, and notes the separate `image_events` stream surface. Prevents future readers from wiring this taxonomy into §3.2 priority list or §4 router action map. tests/phase_z2/test_debug_json_event_surfacing.py (new, 2 tests): - `test_write_debug_json_surfaces_image_and_table_events` invokes write_debug_json with synthetic visual_runtime_check containing both event lists; reads back the on-disk debug.json and asserts both keys are present at top level with the exact payloads. - `test_write_debug_json_defaults_when_visual_runtime_check_none` asserts both new keys default to `[]` when visual_runtime_check is None — guards the defensive `(… or {})` pattern. tests/phase_z2/test_spec_taxonomy_image_aspect_mismatch.py (new, 2 tests): - `test_spec_has_image_aspect_mismatch_row` opens the spec file and asserts exactly one `^\| image_aspect_mismatch \|` row exists inside the §3.1 table block (no markdown-parser dependency). - `test_spec_row_marks_post_render_fail_reasons_semantic` asserts the row text carries both "Post-render" and "fail_reasons" tokens — enforces the Stage 1 guardrail wording. Verification (Stage 4 PASS, Claude + Codex independent): - pytest -q tests/phase_z2/test_debug_json_event_surfacing.py \ tests/phase_z2/test_spec_taxonomy_image_aspect_mismatch.py → 4 passed in 0.07s. - git diff scope: 4 files, +148 insertions / 0 deletions. Scope-locked: no edits to classifier (실행-3), event generation (실행-1/2), Step 21 viewer, §3.2 priority list, §4 router action mapping, or `table_self_overflow` taxonomy row. Pre-existing dirty/untracked working-tree files left untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
535c4848fd |
feat(IMP-15): 실행-3 — classifier consumes image+table events
Issue #47 (IMP-15 실행-3 axis 3): extend `classify_visual_runtime_check` to consume the `image_events[]` and `table_events[]` arrays produced by `run_overflow_check` (실행-1/2) and widen `visual_check_passed`. Changes (src/phase_z2_classifier.py): - Remove `overflow.passed=True` early-return so image/table event scans always run, even when zone-level overflow was clean. - Deferred import of `IMAGE_ASPECT_DELTA_TOL` and `TABLE_SCROLL_TOL_PX` from `phase_z2_pipeline` (circular-safe SSoT; no duplicate literals). - New `image_events` scan emits `image_aspect_mismatch` when `delta is not None AND |delta| > IMAGE_ASPECT_DELTA_TOL` (delta=None ⇒ skip, image not loaded). - New `table_events` scan emits `tabular_overflow` when `wrapper_clipped_index is None AND (excess_x or excess_y > TABLE_SCROLL_TOL_PX)` (wrapper-clipped tables deduped against the existing zone cascade). - `visual_check_passed = overflow.passed AND not classifications` — any image/table classification now flips the gate. Guardrails preserved: - §3.2 8-rule zone cascade (clipped_inner / zone-self) untouched — the new emitters are ADDITIONAL. - `placement_diagnostics`, `categories_seen`, `unclassified_signals` return-shape preserved. - No `pipeline.py` production changes; no router action or `debug.json` passthrough changes. Tests (tests/phase_z2/test_phase_z2_visual_classifier.py — new): - `test_image_aspect_mismatch_emits_classification` (|delta|>TOL fires) - `test_image_aspect_delta_below_tol_no_classification` (≤TOL skipped) - `test_standalone_table_overflow_emits_classification` (wrapper_clipped_index=None, excess>TOL fires) - `test_table_dedup_when_wrapper_clipped` (wrapper_clipped_index set ⇒ no `tabular_overflow` emit) All 4 pure-dict (no Selenium / chromedriver / pipeline execution). Tolerances imported from `phase_z2_pipeline` (SSoT enforced via test import — no classifier-local literals). Verification (Stage 4): - New classifier tests: 4/4 PASS. - Regression `tests/phase_z2/` excluding new file: 93/93 PASS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
2827622858 |
feat(IMP-16): Step 14 table_self_overflow detection
Add table self-overflow detection with element-identity wrapper dedup, mirroring the image_aspect_mismatch axis pattern (#45). JS layer: TABLE_SCROLL_TOL_PX=5 module constant; clippedWrapperMap built as Map<Element,int> keyed by DOM node reference (NOT className) so two wrappers with identical class strings remain distinguishable; table_events collected via querySelectorAll('table').forEach with closest()-ancestor walk resolving wrapper_clipped_index = int|null. Py layer: aggregate result['table_events'] and append fail_reason 'table_self_overflow' only when (excess_x>TOL OR excess_y>TOL) AND wrapper_clipped_index is None; wrapper-clipped path continues to fail via existing clipped_inner reporting. Tests (Selenium, chromedriver guard mirrored from image_check): - Fixture D: standalone <table> overflow → table_self_overflow fail - Fixture E: <table> in clipped wrapper → dedup suppresses table fail - Fixture F (F1 acceptance): two wrappers with identical className f13b-cell, W1 clipped by non-table child, W2 hosts self-overflow <table> with W2 itself NOT clipped → element-identity ensures W2's table is not suppressed by W1's class; both fails emitted. Out of scope: image_events behavior (intact from #45), classifier pass/fail consumer (→실행-3), debug.json surfacing (→실행-4). Refs: #46 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
f3bff898fb |
feat(orchestrator): initial orchestrator + subprocess cleanup hardening
Pre-existing P0+P1 fixes (verified via #45 pilot 2026-05-18): - P0-1: detect_agent first-line only (fixes #45 infinite loop) - P0-2: stage_start_count sanity reset on external comment delete - P0-3: 32 pytest cases for parse/detect regressions - P1-4: execution-issue mode prompt (compact scope-tight) - P1-5: Stage 2 COMPACT_PLAN_RULE (size budget, no code snippets) - P1-6: tests:[] orchestrator-level enforcement at Stage 2 YES guard - P1-7: dual-write CRLF/trailing-whitespace normalize P3 subprocess cleanup (PID 2780 orphan grandchild regression): - (pid, create_time) signature tracking — Windows PID reuse safe - _kill_process_tree: parent-alive traversal path - _kill_tracked: parent-dead orphan path - _run_with_tree_kill: 1s monitor thread captures descendants live - atexit + SIGINT safety net via _SPAWNED set - 4 subprocess.run sites switched to wrapper (compaction/exit_report/ run_claude/run_codex) - 12 cleanup pytest cases incl. C6 PID 2780 regression test Selenium boundary unchanged — driver.quit() in phase_z2_pipeline.py and slide_measurer.py already protected by try/finally. Total: 44/44 pytest pass (32 core + 12 cleanup). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
e9b3d2e9c0 |
feat(IMP-15): 실행-1 — Step 14 image_aspect_mismatch detection
Issue: #45 (IMP-15 실행-1, image axis only). Adds Selenium-based <img> aspect ratio measurement to Step 14 run_overflow_check + numeric tolerance gate. Tolerance lives as module-scope constant so tests can import it. src/phase_z2_pipeline.py (+73/-2): - L131-L135 IMAGE_ASPECT_DELTA_TOL = 0.05 (module scope, importable) - L2216-L2261 JS payload extension: image_events[] per <img> (src, zone_position via closest('.zone') with 'unknown' fallback, zone_template_id, natural/rendered w+h+ratio, delta, slide-rel bbox) - L2262 run_overflow_check return extended with image_events - L2302-L2320 Python aggregation: abs(delta) > TOL ⇒ fail_reasons append 'image aspect mismatch in zone--<pos>: natural=<n> rendered=<r> delta=<+d> (template=<tid>, tol=0.05, src=<src>)'. Null-delta entries (image not loaded) are skipped — no false positive. Branch placed AFTER existing non-image branches; ordering & strings for slide/slide-body/zone/clipped_inner unchanged. - L4425-L4429 Step 14 note: image half closed, table half deferred to 실행-2. tests/phase_z2/test_phase_z2_step14_image_check.py (+196, new): - 3-tier chromedriver resolver mirroring pipeline (PROJECT_ROOT/ chromedriver{,.exe} → PATH → Selenium Manager probe). - pytestmark: skip when chromedriver unresolvable AND PHASE_Z_REQUIRE_SELENIUM != '1'; xfail(strict=True) opt-in when =='1'. - Fixture A: 200×100 img rendered 200×100 → aspect_delta < 0.05, passed. - Fixture B: 200×100 intrinsic forced to 200×200 → delta > 0.30, fail_reason present. - Fixture C: <img> with no .zone ancestor → zone_position == 'unknown'. Verification (Stage 4 PASS, Claude + Codex independent): - pytest -q tests/phase_z2/test_phase_z2_step14_image_check.py → 3 passed - PHASE_Z_REQUIRE_SELENIUM=1 same suite → 3 passed (strict opt-in) - pytest -q tests/phase_z2 → 90 passed (no regression) - pytest -q --ignore=tests/matching → 174 passed Scope-locked: no slide_base.html / catalog / classifier / debug.json / spec-doc changes. table_events (실행-2), visual_check_passed flip (실행-3), debug.json image_events surfacing + PHASE-Z spec doc row (실행-4) remain queued as separate IMP-15 child execution issues. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
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
|
||
|
|
7d5639ad72 |
feat(IMP-13): A-3 — build-time frame preview generator (capture_slide_screenshot salvage)
scripts/generate_frame_previews.py iterates figma_to_html_agent/blocks/{frame_id}/index.html,
renders preview.png via Selenium headless (capture_slide_screenshot pattern reuse), and writes
_preview_manifest.json (schema v1) with idempotent stale-detect (mtime+sha256). Build-time only
— no runtime pipeline integration, no AI calls, no MDX/Jinja regen. Stage 2 baseline (commit
|
||
|
|
56619a0239 |
feat(IMP-12): Step 16/17 retry refinement — multi-donor + 3-stage salvage cascade
Extend Step 17 deterministic action surface so donor_slack_insufficient no longer abort-terminates at zone_ratio_retry. AI is NOT invoked on the normal salvage path. Source changes (4 files, scope-locked): - src/phase_z2_retry.py — plan_zone_ratio_retry: single-primary-donor → multi-donor greedy aggregation (donors_used / aggregate_slack_used / aggregate_slack_available); new plan/apply pairs: cross_zone_redistribute (wraps fit_verifier.redistribute, data-role scoped CSS), glue_compression (wraps space_allocator.compute_glue_css_overrides, data-zone-position scoped), font_step_compression (wraps find_fitting_font_size, zone-scoped, defensive feasible=False on missing text_metrics). - src/phase_z2_failure_router.py — classifier inspects salvage_steps[-1] via SALVAGE_FAILURE_TYPE_BY_ACTION; NEXT_ACTION_BY_FAILURE rewired into donor_slack_insufficient/no_donor_candidates → cross_zone_redistribute → glue → font_step → layout_adjust; 3 IMPLEMENTED salvage status rows added. - src/phase_z2_router.py — ACTION_IMPLEMENTATION_STATUS registers 3 new salvage actions as IMPLEMENTED; ACTION_BY_CATEGORY untouched (cascade-only labels). - src/phase_z2_pipeline.py — new _attempt_salvage_chain() iterates router next_proposed_action with retry_budget=1 per action; honors IMP-09 dynamic_cols / fr_default gate; preserves (b)-revert on all-fail; wires Step 17 telemetry (salvage_steps / salvage_passed). Tests (6 new pytest modules): - test_phase_z2_retry_multi_donor.py — single sufficient (regression), 1st insufficient + 2nd sufficient (multi-donor PASS), aggregate insufficient FAIL. - test_phase_z2_cross_zone_redistribute.py — multi-role zone feasible, single-role zone short-circuits infeasible. - test_phase_z2_glue_compression.py — feasible asserts emitted CSS contains [data-zone-position=...] selector and NO global :root/body/.slide rule. - test_phase_z2_font_step_compression.py — 15.2 → 13 closes excess; 8px floor; missing text_metrics → defensive infeasible reason. - test_phase_z2_failure_router_cascade.py — donor_slack_insufficient → cross_zone (impl=IMPLEMENTED); 3 new failure types → expected next actions; rerender_still_fails preserves frame_reselect terminus. - test_phase_z2_step17_salvage_chain.py — end-to-end (a) cross_zone PASS promotes final.html, (b) cross_zone FAIL + glue PASS promotes 2nd candidate, (c) all-3 FAIL preserves original final.html (revert). Guardrails preserved: - AI calls: 0 on normal path (feedback_ai_isolation_contract) - Spacing direction: no shrink-common-margin; resolve via donor/glue/font-step within frame envelope (feedback_phase_z_spacing_direction) - All CSS overrides scoped to [data-role=...] or [data-zone-position=...] - IMP-09 dynamic_cols / fr_default gate honored in cascade - (b)-revert preserved if all 3 salvage actions fail Refs: gitea#12 IMP-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
a79bd8bc43 |
feat(IMP-11): D-2 — frame min_height_px hint (backend → UI)
Step 9 v4_all_judgments[] now exposes per-candidate min_height_px from catalog frame_contracts.visual_hints.min_height_px (None when contract unregistered). SlideCanvas pendingLayout zones render a red ring + 'min H Npx' badge when zone height falls below the active frame's threshold. Visual hint only; resize clamp (minSize=0.05) unchanged. 5 axes (single commit per Stage 5 plan): - u1 backend: src/phase_z2_pipeline.py — Step 9 builder adds min_height_px via single get_contract(c.template_id) lookup; reuses _contract for catalog_registered (no double-lookup). - u2 type: Front/client/src/types/designAgent.ts — FrameCandidate gains optional minHeightPx?: number. - u3 mapper: Front/client/src/services/designAgentApi.ts — maps snake-case min_height_px → camelCase minHeightPx on v4_all_judgments path; v4_candidates fallback remains undefined (graceful). - u4 active-frame lookup: Front/client/src/components/SlideCanvas.tsx — activeFrameId = overrideFrameId ?? defaultFrameId; activeCandidate via region.frame_candidates.find. - u5 hint render: Front/client/src/components/SlideCanvas.tsx — zoneHeightPx = height * SLIDE_H (logical px, no double-apply); compare against activeCandidate.minHeightPx in pendingLayout mode only; red border + badge when below. Tests: 5/5 pass in tests/test_phase_z2_step9_v4_all_judgments_min_height.py (source-string + catalog-shape guards + None propagation, registered and unregistered template_ids). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
0fb168befc |
feat(IMP-10): D-1 — filtered_section_reasons UI (read-only)
Surface step20_slide_status.json.data.filtered_section_reasons in the frontend Home header. Verbatim mirror of backend payload — no enum redefinition, no translation, no auto-classification. Units: - u1: FilteredSectionReason interface mirroring src/phase_z2_pipeline.py :2217-2278 (10 fields incl. override-uncovered source/position variant). - u2: RunMeta extension + loadRun() mapping with ?? [] back-compat defaults. - u3: Header badge + <details> disclosure adjacent to existing status badge; hidden when filtered_section_ids.length === 0; renders all 10 schema fields + filter_reasons[] verbatim. Scope: - Frontend-only, read-only. No backend / sync script / Kei·AI panel changes. Files: Front/client/src/services/designAgentApi.ts (+20), Front/client/src/pages/Home.tsx (+25). Refs: gitea issue #10 (IMP-10 D-1 filtered_section_reasons UI) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
1fb973297f |
feat(IMP-09): PR 2 — 2-D dynamic dispatch for 5 preset families
Stage 3 lock implementation: extend build_layout_css dispatch beyond
the horizontal-2 / vertical-2 1-D dynamic paths. T / inverted-T /
side-T-left / side-T-right / 2x2 now flow through a 2-D track solver
instead of the fr_default sink, with length-locked heights_px (R) +
widths_px (C) on every return path (default and override).
PR 2 scope (u1~u5):
- u1: _aggregate_zone_signals_per_track — per-row + per-col virtual
zones via max(weight) + max(min_height_px) of single-span zones,
falling back to all-span when a track has none.
- u2: _build_grid_dynamic_2d default builder — feeds virtual zones
into compute_zone_layout + compute_zone_layout_cols; emits
computation="2d_dynamic_aggregated", dynamic_rows=True,
dynamic_cols=True.
- u3: _override_to_grid_tracks override builder — single-span
aggregation (max h per row, max w per col), normalize, multiply
by avail_h/avail_w, last-element diff absorb; emits
computation="user_override_geometry"; falls back to u2 when
total_h or total_w == 0.
- u4: build_layout_css dispatcher wiring — topology in
{T, inverted-T, side-T-left, side-T-right, 2x2} routes to
_build_grid_dynamic_2d (default) or _override_to_grid_tracks
(override); legacy [override-warning] stderr removed for the
5 presets; step08 trace gains a 2-D-aware print line that fires
before the dynamic_rows / dynamic_cols branches.
- u5: PR 1 lock test test_top_1_bottom_2_fr_default_populates_geometry
renamed to test_top_1_bottom_2_dynamic_2d_populates_geometry and
flipped to PR 2 reality (computation="2d_dynamic_aggregated",
dynamic_rows=True, dynamic_cols=True).
Fixtures: 10 build_layout_css (5 presets × {default, override}) +
5 retry_gate *_dynamic_2d.yaml locking the retry gate skip reason
"dynamic_cols (2-D topology) ... IMP-09 lock" for the 5 presets.
Tests: python -m pytest -q tests = 104 passed (Stage 2 baseline
10 RED → GREEN, 0 regressions). Kei archive
(build_containers_type_b / page_structure) untouched —
rg "build_containers_type_b|page_structure" src/phase_z2_pipeline.py
returns 0 hits.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
201099e53b |
feat(IMP-09): PR 1 — col-axis solver + per-zone geometry mapper + retry gate
Stage 3 round 4 lock implementation: extend build_layout_css beyond
the horizontal-2-only dynamic path. Every layout_css return now
carries length-locked col-axis keys (widths_px, width_ratios,
dynamic_cols) matching the parsed css_areas grid (R rows, C cols),
so 2-D layouts (T / 2x2 in PR 2) and the unified
_compute_per_zone_geometry mapper can plug in without further
contract churn.
PR 1 scope:
- _parse_css_areas + _parse_fr_string + _compute_per_zone_geometry
(unified — 1-D and 2-D from the same code path)
- compute_zone_layout_cols (vertical-2 weight-only solver)
- _build_fr_default / _build_rows_dynamic / _build_cols_dynamic
(populate widths_px/heights_px on every return path)
- build_layout_css override branch keeps the warn-and-fallthrough
legacy for unsupported presets (PR 2 promotes to strict raise)
- retry gate in _attempt_zone_ratio_retry skips when dynamic_cols=True
or dynamic_rows=False, with explicit retry_skipped_reason
- Step 8 artifact gains zone_widths_px_planned /
zone_col_ratios_planned (top-level) + zone_width_px_planned /
zone_col_ratio_planned (per-zone)
- debug_zones width injection via _compute_per_zone_geometry
(replaces the legacy row-only zip)
Tests: tests/phase_z2/ — 47 new cases (parse / fr-string / cols solver /
per-zone geometry / build_layout_css contract / retry gate +
6 build_layout_css YAML fixtures + 3 retry_gate fixtures).
Verification: python -m pytest -q tests = 89 passed (was 42).
horizontal-2 grid CSS strings (areas/cols/rows) byte-identical to
legacy; only additive col-axis keys are introduced.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
8f6cffc2a7 |
fix(IMP-08): Stage 5 R2 — aligner force-drill on sub-id override targets
Codex #1 (Stage 5) reproduced a smoke regression on the actual checkout : when V4 carries the parent exact key (e.g., `04-2`) AND the drag/drop override targets a sub-id (`primary=04-2-sub-1`), the aligner kept the parent at parent granularity and emit `['04-1', '04-2']`, so the override flag failed with `unknown section_id(s) ['04-2-sub-1']`. Fix : `align_sections_to_v4_granularity` gains an optional `override_target_section_ids` keyword. From each canonical `${parent}-sub-N` target it derives the parent id and adds it to a `force_drill_parents` set. Sections in that set are drilled into sub-sections regardless of whether V4 carries the parent exact key. Top-level override targets (no derived parent) do not trigger force-drill, so backward-compat is preserved for parent-granularity overrides. The call site in `run_phase_z2_mvp1` collects sub-ids from `override_section_assignments` and forwards them to the aligner. Generalization (RULE 0) : - Trigger is the override schema (`X-sub-N`), not a specific MDX / section / frame id. Applies to all 32-frame MDX uniformly. - Decision is deterministic on the override target shape, independent of V4 yaml content. - Default (no override) path is unchanged byte-for-byte. Side fixes (forward-only RULE 1 cleanup, no history rewrite) : - `align_sections_to_v4_granularity` docstring rewritten in English (overwrites the Korean docstring committed in |
||
|
|
ab2764c8d0 |
feat(IMP-08): U3 — frontend wire (zoneSections override)
Wires the frontend drag/drop zone assignment through to the backend --override-section-assignment CLI flag. PipelineOverrides gains an optional zoneSections field (Record<string, string[]>) carrying canonical ordinal section ids (e.g., "top": ["04-2-sub-1"]). Vite middleware /api/run accepts overrides.zoneSections and forwards each non-empty zone as `--override-section-assignment ZONE=sid[,sid]`. Empty arrays and non-string sids are filtered to avoid bogus assignments from a partially-built UI state. Home.tsx builds the override with a diff-vs-default guard per Codex Stage 3 R3 B3 fix : createInitialUserSelection seeds zone_sections with the auto plan, so a literal copy would pollute backend assignment-source provenance even on a fresh re-render. The diff compares each zone's section list against sourcePlan.zones[].section_ids and only emits zones that differ. Toast summary now reports zoneSections=N when forwarded. Smoke verification : python -m src.phase_z2_pipeline samples/mdx_batch/04.mdx test_imp08_smoke --override-section-assignment primary=04-2-sub-1 produces section_assignment_plan with assignment_source=cli_override and v4_selector_trace.candidates populated via the U1 alias resolver (04-2-sub-1 -> 04-2.1 V4 entry). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
5191acad85 |
feat(IMP-08): U2 — aligner canonical sub-id + N-R5 decimal alias guard
align_sections_to_v4_granularity now emits canonical sub-section ids
of the form ${section_id}-sub-${ordinal} (e.g., "04-2-sub-1"), matching
the frontend drag/drop schema. Each drilled sub-section populates
heading_number (decimal "2.1" / integer "1" / None for undecorated)
and v4_alias_keys for legacy V4 keys.
N-R5 decimal-only alias guard : v4_alias_keys is populated only when
heading_number matches re.fullmatch(r"\d+\.\d+", ...). Integer-only
H3 headings (e.g., MDX 05's "### 1", "### 2") and bare H3 headings
produce no alias to avoid sibling-parent V4 collisions (RULE 0
generalization — applies to all 32-frame MDX, not MDX 05-specific).
The drill regex is broadened from r"^###\s+(\d+\.\d+)\s+..." to
r"^###\s+(?:(\d+(?:\.\d+)?)\s+)?(.+?)$" so integer-only and bare H3
headings are now recognised as sub-sections; they previously failed
the regex and were silently kept under the parent section.
Tests : 7 new cases (MdxSection default 4-positional callers, V4 exact
passthrough, decimal drill with alias, integer-only no-alias guard,
bare H3 no-alias, no-H3 passthrough, end-to-end aligner -> resolver
round-trip with legacy V4 alias). 15/15 in test_phase_z2_subsection_schema
+ 14 override + 8 fallback baseline = 37/37 PASS.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
a422d72c0b |
feat(IMP-08): U1 — schema helper + V4 alias resolver (4 lookup sites)
Adds sub-section schema fields (heading_number / v4_alias_keys /
sub_sections) to MdxSection with defaults so existing 4-positional
constructions remain valid. Introduces _resolve_v4_section_key helper
that resolves a V4 mdx_sections key in exact > alias > None order with
no parent/sibling promotion (axis 7 hybrid lock).
Rewires four runtime V4 lookup sites (lookup_v4_match,
lookup_v4_match_with_fallback, lookup_v4_all_judgments,
lookup_v4_candidates) to accept an optional alias_keys kwarg and go
through the resolver. U1 callers pass empty alias lists so behaviour
is byte-identical to the previous exact-match path; U2 will populate
aliases from MDX heading_number metadata.
Closure callers in run_phase_z2 build section_alias_by_id from
MdxSection.v4_alias_keys and forward into lookup_fn /
candidates_lookup_fn / lookup_v4_all_judgments (Step 7-A trace) and
into _select_template_for_overrides single-section selector.
Step 9 candidate report (post-decision diagnostic) is marked with an
inline English exemption comment per N-R6 — runtime selection goes
through _resolve_v4_section_key, the report path stays a direct
dict-shape lookup to avoid debug_zones schema plumbing.
derive_parent_id now recognises canonical ordinal ids
("03-1-sub-2" -> "03-1") first and keeps the legacy decimal fallback
("04-2.1" -> "04-2") for V4 alias compatibility.
Tests : 8 synthetic cases in tests/test_phase_z2_subsection_schema.py
covering derive_parent_id ordinal/decimal/none and the resolver
exact/alias/no-promote/miss cases. 30/30 PASS combined with the 14
override + 8 fallback baseline.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
0f0d3fa91f |
feat(frontend): add Front/ — Vite/React frontend with backend pipeline integration
Mirror of design_agent_front/design-agent/ for shipping alongside backend.
Vite plugin (vitePluginPhaseZApi) endpoints :
- POST /api/run — spawn `python -m src.phase_z2_pipeline` with overrides
- GET /api/sample-mdx?mdx=03/04/05 — fixed sample MDX
- GET /frame-preview/{n} — figma preview thumbnails
- GET /data/runs/{run_id}/{path} — pipeline artifacts (final.html, step*.json, ...)
Env toggle forward (보고용) :
PHASE_Z_ALLOW_RESTRUCTURE / PHASE_Z_ALLOW_REJECT / PHASE_Z_MAX_RANK=32
Components :
- LeftMdxPanel (03/04/05 fix list + section tree)
- SlideCanvas (iframe + slideOverrideCss prop for inline CSS inject)
- FramePanel (label priority + confidence sort)
- LayoutPanel
README with mermaid diagrams covering the 5-step demo flow.
node_modules / dist / .manus-logs / .env excluded via .gitignore.
|
||
|
|
52ccb7fc8b |
fix(IMP-06): Stage 4 blocker-fix — render_records + plan-aware traces
Three Codex #13 blockers in a single coherent commit. Blocker 1 (units None hazard) — drop None placeholders from `units` list. Replace with a separate `render_records` layer built AFTER frame_overrides apply. units = canonical renderable list (list[CompositionUnit] only); render_records = canonical per-position view including empty / collision- skipped / cli_override entries. Downstream loops (Step 6 print, frame_ overrides, zones_data/debug_zones, Step 9 application_plan, compute_slide_ status covered loop) no longer need None guards. Blocker 2 (no integration test) — add end-to-end pipeline integration test: `--override-section-assignment top=03-2` on sample 03 MDX produces zones_data[top].source_section_ids = ['03-2'], debug_zones[top].assignment _source = 'cli_override', debug_zones[bottom].v4_template_id = '__empty__' (override_collision whole-skip), step20 filtered_section_ids contains '03-1', and filtered_section_reasons carries a section_assignment_override _uncovered entry. Proves the render path — not only comp_debug — reflects the CLI override. Blocker 3 (Step 9/20 not plan-aware) — surface plan-aware additive fields in both render-path debug_zones/zones_data and Step 9 application_plan units: position, assignment_source, section_assignment_override, replaced_auto_unit, skipped_collided_auto_units, uncovered_section_ids, skipped_reason. compute_slide_status appends Codex #10 Catch O list-shaped filtered_section_reasons entries for override-uncovered sections and folds them into filtered_section_ids so full_coverage is re-evaluated post-override. Exact-id-only collision semantics enforced (Codex #14/#15/#16/#17): S3 and S3-1 are distinct ids; no prefix hierarchy, no parent cascade. Three new section-id invariant tests added (parent-like vs child-like, exact duplicate collision detected, distinct ids coexist). Test : 24 pytest pass (9 helper + 9 case + 3 invariant + 1 case 9b + 1 integration + 1 from v4_fallback baseline) ; smoke 11/11 PASS. Register `integration` pytest marker in pyproject.toml. |
||
|
|
1f15495117 |
feat(IMP-06): Stage 4 Part 2 — render-path integration (units rebuild + empty zone + Catch K fix)
Refs #6 After `position_assignment_plan` is built, rebuild the `units` list to be plan-aligned so downstream `zones_data` / `debug_zones` / mapper / render all see the post-override sequence. This resolves the long-standing trace-only gap and closes Codex Catch K naturally because the helper now actually drives downstream materialization. - run_phase_z2_mvp1: after `_build_position_assignment_plan`, rebuild `units` ordered by `position_assignment_plan`. `cli_override` entries synthesize a CompositionUnit (resolved template_id + concatenated section raw_content + contract frame_id + selection_path="cli_override" + override audit in rationale). `auto` entries reuse the original planner unit. empty/collision-skipped entries become None placeholders so the downstream zone loop can emit an explicit empty zone record without distorting layout allocation. - zones_data / debug_zones loop: handle `unit is None` by appending an explicit empty record with template_id="__empty__", content_weight=0, min_height_px=0, plus the plan's skipped_reason / replaced_auto_unit / skipped_collided_auto_units / uncovered_section_ids audit fields. - partial render loop: `template_id == "__empty__"` short-circuits to `partial_html = ""` so the slide_base zones loop preserves grid identity without raising TemplateNotFound. - Update the helper-invocation comment so it now describes the actual Part 2 behavior (units rebuild + empty zone handling). Catch K is no longer a future-tense placeholder. Stage 4 Part 3 (follow-up commit) will add: Step 9 application_plan plan-aware additive fields, Step 20 list-shaped filtered_section_reasons entries for override-uncovered sections (Codex #10 Catch O schema), and integration tests proving zones_data["top"] actually contains the overridden section ids when --override-section-assignment is supplied. Regression: 20/20 unit tests pass (9 IMP-06 helper + 8 IMP-05 fallback + 2 catalog invariant + 1 dedicated replaced_auto_unit test), smoke self-check 11/11 (IMP-04 F17 calibration intact). No AI, no calculate_fit, no full planner rerun, no frontend, no sample hardcoding. plan_composition() signature preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
b81e564f65 |
feat(IMP-06): Stage 4 part 1 — replaced_auto_unit field + comment fix
Refs #6 Stage 4 split per Codex #10 acceptance: this commit lands the schema + trace refinements required before the render-path rewiring. The actual units/zones_data/Step 9/Step 20 plan-driven materialization remains in Stage 4 part 2 (follow-up commit) so each commit is reviewable on its own and regression-safe. - _build_position_assignment_plan: add replaced_auto_unit field. Populated only when the explicitly overridden position already held an auto unit AND that auto unit had different source_section_ids than the override. Documents a same-position override replacement as a distinct audit fact, separate from skipped_collided_auto_units which captures cross-position whole-skips per the locked collision policy. - Backfill replaced_auto_unit = None on the empty/collision/auto branches for schema-stable consumers. - Update the override-application comment near the helper invocation so it no longer claims the helper "reorders units"; Stage 4 part 2 will be the commit that wires the plan into the actual render path. - Helper unit tests: assert replaced_auto_unit shape in the collision scenario and add a dedicated case that distinguishes same-sections (template swap via --override-frame -> None) from different-sections same-position replacement (populated, reason="same_position_override_replacement"). No AI, no calculate_fit, no full planner rerun, no frontend, no sample hardcoding. plan_composition() signature preserved. helper remains pure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
d596fabde0 |
feat(IMP-06): zone-section assignment override CLI + plan helper (trace-only)
Refs #6 Backend / CLI / composition path only — frontend bridge remains #38. - Add `--override-section-assignment ZONE_ID=section_id[,section_id]` to the Phase Z entry parser. Parse-time hard errors for malformed payloads, empty zone id, empty section list, duplicate zone id, and duplicate section across zones (a section may belong to at most one zone). - Add `_build_position_assignment_plan` helper (pure function, resolved `positions` injected). Builds a per-position assignment plan with the Codex-locked template_id ladder: (1) `--override-frame` exact unit_id wins, (2) exact existing auto unit reuse, (3) single-section direct-executable V4 selector via `lookup_v4_match_with_fallback(..., raw_content=section.raw_content)`, (4) ad-hoc multi-section override without exact auto + without explicit override-frame yields `skipped_reason='ad_hoc_merged_no_template'`. - Lock the collision policy: explicit override wins per position, sections appear in at most one position, overlapping auto units are skipped whole (no split, no cascade, no replan), uncovered sections from the previous same-position auto unit are recorded in `uncovered_section_ids`. - Additive trace fields on each plan entry: `previous_source_section_ids`, `skipped_collided_auto_units`, `uncovered_section_ids`, `v4_selector_trace`, `section_assignment_override`. Top-level `comp_debug["section_assignment_plan"]` + `comp_debug["section_assignment_summary"]` so Step 9 / debug artifacts can derive from a single source of truth. - Wire `run_phase_z2_mvp1(override_section_assignments=...)` after final layout preset resolution: validate ZONE_IDs against active layout positions and validate section_ids against aligned sections (fail-fast). The plan is attached to `comp_debug` for downstream artifacts. Actual `zones_data` / unit-list rewiring is deferred to a follow-up commit so this change stays regression-safe; trace artifacts already surface override intent and collision impact. - Add 9 helper unit tests with fully synthetic MOCK_ ids (no real catalog / no v4_full32_result.yaml): non-conflicting auto retention, collision whole-skip + uncovered tracing, template ladder steps 1/2/4, unit_id naming convention, previous_source_section_ids position history, empty-position case, summary aggregation invariants. No AI, no `calculate_fit`, no full planner rerun, no frontend, no sample hardcoding, no `restructure`/`reject` silent promotion. `plan_composition()` signature is preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
23d1b25144 |
test(IMP-05): tighten Step 9 candidate evidence guard
Refs #5 Replace the hand-built Case 7 payload assertion with a temporary production-source guard. The test now fails if Step 9 stops emitting candidate_evidence, breaks the fallback_chain compat alias, or removes the alias intent comment. This is intentionally temporary because Step 9 application-plan unit assembly is inline. Follow-up IMP-32 should extract a helper and replace this source-string guard with a direct helper test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
21476ae000 |
fix(IMP-05): complete V4 fallback evidence and dedup qualifiers
Refs #5 - Add runtime template_id dedup in lookup_v4_match_with_fallback with first-occurrence reservation; duplicate ranks become audit evidence, not new fallback candidates. - Add Step 9 candidate_evidence as the primary per-unit evidence field while keeping fallback_chain as a compat alias for legacy readers. - Add Step 20 fallback_selection_count and selection_paths derived from comp_debug.v4_fallback_summary with defensive defaults; top-level overall enum unchanged. - Tighten synthetic fallback tests for duplicate handling (rank-1 reject A + rank-2 use_as_is A + rank-3 distinct B → rank-3 wins) and add tests for candidate_evidence + alias equality and Step 20 qualifier presence with defensive defaults. - Verify with pytest (10 passed) and smoke_frame_render --self-check (11/11 partials, IMP-04 F17 calibration intact). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
15c5b9ae00 |
IMP-05 deterministic V4 candidate bridge — pre-render rank-2/3 fallback + trace schema + dedup invariant test
round 55~73 review-loop lock per Codex #11 final + Claude #13 6-axis L1~L9. Scope (deterministic only) : - pre-render rank-2/3 fallback via lookup_v4_match_with_fallback (selector only, no calculate_fit migration, no AI, no full planner rerun, no layout topology change, no abort behavior change) - Step 9 informative candidate_evidence schema (additive) — v4_label / phase_z_status / catalog_registered / filtered_for_direct_execution / route_hint / decision / reason - Step 20 qualifier fields (additive) — fallback_used / fallback_selection_count / selection_paths[] — top-level enum unchanged - restructure / reject candidates preserved as non-direct evidence with route hints (design_reference_only / ai_adaptation_required) — deferred actual handlers IMP-29/IMP-31 - catalog 1:1 invariant test (separate file tests/test_catalog_invariant.py) — fails fast if template_id/frame_id 1:1 mapping ever breaks - 6 behavior tests fully synthetic with MOCK_ prefix (no real catalog IDs, no v4_full32_result.yaml dependency) — monkeypatch get_contract + compute_capacity_fit (selector has no DI, function signature unchanged) Deferred to follow-up issues : - IMP-30 first-render invariant + abort bypass (zero-unit + section status filter) - IMP-29 frontend zone-level override (deterministic only) - IMP-31 AI-assisted frame-aware adaptation Guardrails locked : no calculate_fit / no AI / no frontend / no full rerun / no layout topology / no abort behavior change / no 1-2 sample hardcoding. Tests : 8/8 pass (6 selector behavior + 2 catalog invariant). Smoke regression : 11/11 partials pass (IMP-04 F17 calibration intact). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
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>
|
||
|
|
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)
|
||
|
|
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)
|
||
|
|
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)
|
||
|
|
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)
|
||
|
|
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 (
|
||
|
|
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)
|
||
|
|
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)
|
||
|
|
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 (
|
||
|
|
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)
|
||
|
|
46e9db30b2 |
docs(IMP-04): adopt 3-layer architecture + 4-class failure taxonomy
Wording-only matrix clarification per Codex #15477 architecture correction + #15485 acceptance + Claude rounds 32/34 agreement. Two foundational changes : 1. New §0 — Architecture context (3-layer) - V4 = matching basis / design-selection authority - figma_to_html = rich source/evidence layer (visual hierarchy, assets, layer structure, geometry, source intent, provenance) - Phase Z = runtime orchestration / assembly / recovery layer (consumes V4 candidates + source evidence; does NOT replace V4 as the matching authority) - Explicit correction: earlier "Phase Z = execution SoT" framing was a 2-layer dichotomy that conflated matching authority (V4) with runtime execution (Phase Z). 3-layer is the correct architecture. 2. Fix 7 in §4.1 — 4-class failure taxonomy as primary - Replaces F1/F2/F3 as the primary technical failure classification. F1/F2/F3 remain only as secondary review / process severity labels. - 4 classes (Codex #15477) : - class 1: adapter/runtime readiness (partial/asset/slot/ contract missing — V4 ranking stays valid) - class 2: content-fit issue (overflow / light edit needed) - class 3: V4 ↔ figma_to_html mapping issue (metadata wrong) - class 4: popup/secondary content routing case - Prior-history reclassification documented : - |
||
|
|
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 |
||
|
|
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 |
||
|
|
2fcd8bb94a |
refactor(persona): refine three_persona_benefits using index.html base (IMP-04 Track A 1/16)
First Track A calibration refinement. Previous commit |
||
|
|
df9ee43d09 |
docs(IMP-04): re-apply matrix clarifications after revert
Re-apply the W1 wording clarifications previously agreed in the comment
thread. The originally executed wording commit `6d33884` was reverted by
Codex via `c807b2c` after Codex acknowledged that `ㄱ` for both Claude and
Codex is comment-only review (no source/doc edit). Both sides 100%
agreement is restored via Claude rounds 16/17/19 and Codex rounds 15/18.
This Claude-applied commit is the agreed re-application path (option A).
Six fixes applied to docs/architecture/IMP-04-FRAME-SUITABILITY-MATRIX.md :
1. §2 ACTIVE 4 frames table : add resource status (A/T/I/F/S) column.
F13 has no `assets/` directory (marked `-`). State that ACTIVE means
catalog-registered / runtime-active, not necessarily A+T+I+F+S
resource-complete.
2. §4 Track B : strengthen wording. Track B = visual-resource-pending
inside the 32-frame scope, **NOT exclusion / discard / scope
reduction**. Visual-resource acquisition timing is the only difference.
3. §4 Track B option (b) : minimal CSS partial from analysis/texts only
is **main path X, explicit temporary placeholder only**. Avoids the
frame 1 (`three_persona_benefits`
|
||
|
|
c807b2c56a |
Revert "docs(IMP-04): clarify matrix tracks and review gates"
This reverts commit
|
||
|
|
6d338846b2 |
docs(IMP-04): clarify matrix tracks and review gates
- Add active-frame resource status and clarify catalog-active versus resource-complete.\n- Clarify Track B as visual-resource-pending inside the 32-frame scope, not exclusion.\n- Clarify Track A priority as execution order, not scope filter.\n- Add Codex review granularity and calibration failure modes for the first refinement.\n- Mark minimal CSS from analysis/texts as temporary placeholder only. |
||
|
|
fe766f13d5 |
docs(IMP-04): 32-frame schema suitability matrix (Gitea #4)
Codex #15337 + #15340 의 schema comparison 추천 답 — 32 V4 frames 의 figma_to_html 자원 inventory + Phase Z runtime catalog mapping proposal. - §1 요약 통계 : analysis/texts 32/32, index.html 20/32 (12 missing) - §2 ACTIVE 4 frames (F13/F29/F16 + three_persona_benefits) - §3 Remaining 28 분류 - §3.1 reusable-now (16) : index.html 보유 frames - §3.2 visual-pending (12) : index.html 부재 frames - §4 Track 분리 (A: visual activation / B: visual-pending / C: matching schema canonical decision IMP-05+ 이양) - §5 Builder 재사용 vs 새 builder 분석 - §6 min_height_px derivation method (flat.md scale) - §7 Resource completeness summary - §8 다음 단계 user 확인 사항 본 doc 은 IMP-04 impl 전 prerequisite. impl 시 per-frame Step 1 (V4/Figma alignment + uniqueness check) 의 input. scope : - Phase Z runtime catalog (executable projection) 으로의 mapping 만 - matching schema canonical decision (Codex #15340) = 별 axis 이양 - visual-pending 12 frames = Track B 옵션 (a/b/c) user 합의 후 진행 Refs Gitea #4 (IMP-04 A-2 Catalog 확장 — schema suitability matrix) |
||
|
|
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 확장)
|
||
|
|
2717a0a3a6 |
feat(infra): per-frame Jinja smoke harness with StrictUndefined (IMP-04 #4)
- Add scripts/smoke_frame_render.py for IMP-04 scope-lock §11+§13:
isolated StrictUndefined Jinja partial render gate, separated from
production render_slide() permissive behavior
- CLI: --self-check runs every bundled fixture; positional template_id
takes payload via --payload <json> / stdin / fixture
- Bundled mock payloads for the 3 existing active frames match real
builder output shape; all 3 partials PASS self-check
- New frame activation gate (per-frame 6-step Step 5): partial must
pass smoke render with a complete mock that mirrors the builder's
output dict (optional fields supplied as empty/falsy so {% if %}
guards still work under StrictUndefined)
- Exit codes: 0=all pass, 1=at least one fail, 2=invalid input
Latent finding (out of IMP-04 scope, surfaced for the record):
bim_issues_quadrant_four partial references slot_payload.quadrant_N_headline,
but _build_quadrant_flat_slots() only produces quadrant_N_label and
quadrant_N_body. The headline div therefore never renders in production.
Either dead reference or a builder extension that was never landed —
reconcile in a follow-up axis, not in IMP-04 catalog expansion.
production render path (phase_z2_pipeline.render_slide) unchanged.
Refs Gitea #4 (IMP-04 A-2 Catalog 확장 — infra commit)
|
||
|
|
fc3f7d8826 |
feat(step2+step3): slide-level rich ContentObject trace (IMP-03 #3)
- Add extract_rich_content_objects(normalized_assets, mdx_id) in
phase_z2_content_extractor.py emitting slide-level rich ContentObjects
for SPEC v1 §1.2 types: details (popups), image, table
- Extend ContentObject dataclass with optional scope/mdx_id/section_id
metadata fields (additive, default None — v0 unchanged)
- _stage0_chained_adapter() returns 5-tuple adding normalized_assets
({popups, images, tables}); empty on env=OFF / hard fallback
- Step 2 artifact gains additive stage0_normalized_assets nested field
(env=OFF / fallback → empty lists). Existing 7 fields preserved.
- Step 3 emits root-level rich_content_objects once at slide scope
with rich_content_objects_enabled / scope / source / disabled_reason /
skips / invariant_warnings. per_zone list still references v0 only.
- PHASE_Z_STEP3_RICH_OBJECTS_ENABLED env flag, default OFF (canary,
matches PHASE_Z_STAGE0_ADAPTER_ENABLED / PHASE_Z_B4_*). Enable
requires flag=1 AND non-empty normalized_assets; otherwise records
disabled_reason = FLAG_OFF or NO_NORMALIZED_ASSETS.
- transform_table dedup: arrow glyph detection in normalized table
rows/headers → skip with reason=skipped_transform_table_duplicate.
v0 _capture_3col_transform_table remains the sole transform_table
source; generic table only for non-transform tables.
- ID pattern {mdx_id}.{details,image,table}-N (slide-level namespace).
- plan_placement() input unchanged (v0 content_objects only) — rich
list never feeds placement/region planning in this issue.
- self-test extended with 5 rich extractor cases (popup/image/table
/arrow-skip/empty); v0 self-test unchanged and still PASS.
- mapper / V4 / composition / Step 6+ / AI/Kei / pipeline_path_connected
unchanged. trace fidelity only.
env OFF + rich OFF: legacy PASS, no regression
env OFF + rich=1 : disabled_reason=NO_NORMALIZED_ASSETS, rich list empty
env=1 + rich=1 : Step 2 stage0_normalized_assets populated (1 table on
MDX 03, invariant match adapter_counts). Step 3 write
blocked by inherited IMP-02 composition_planner abort
(downstream gap, not IMP-03 scope).
Refs Gitea #3 (IMP-03 A-1 popup/image/table trace)
|
||
|
|
bac13c09c4 |
feat(step2): chained adapter for Stage 0 normalize (IMP-02 #2)
- Add _stage0_chained_adapter() helper near parse_mdx() chaining
mdx_normalizer.normalize_mdx_content + section_parser.extract_major_sections
+ section_parser.extract_conclusion_text → reconstructed MdxSection list
- PHASE_Z_STAGE0_ADAPTER_ENABLED env flag, default OFF (canary, matches
PHASE_Z_B4_SOURCE_SHAPE_ENABLED / PHASE_Z_B4_GATEKEEPER pattern)
- Section ID reconstruction priority: raw_heading (pre-scan raw MDX
`## N. Title` heading → title→num map lookup) → raw_heading_inline
→ order_fallback. All paths logged in id_reconstruction_log
- 5 hard fallback enums: ADAPTER_EXCEPTION / NO_USABLE_SECTIONS /
MISSING_INVALID_IDS / DUPLICATE_IDS / NON_POSITIVE_SECTION_NUM
- Additive step02_normalized.json field stage0_adapter_diagnostics
(enabled / used / fallback_reason / id_reconstruction_log /
adapter_counts / diff_vs_legacy / legacy_counts)
- Preserve Step 2 existing 7 fields (slide_title / slide_footer /
sections_count / sections / orphans / details) — additive only
- Defer mdx_normalizer / section_parser imports so legacy default-OFF
path does not depend on those modules
- V4 / align_sections_to_v4_granularity / composition / AI/Kei /
frame selection / status semantics unchanged
env OFF: legacy path PASS on MDX 03, no regression
env=1 : adapter path activates, IDs 03-1/03-2, raw_heading reuse
triggered, downstream composition_planner abort surfaces
as canary finding (out of scope for IMP-02)
Refs Gitea #2 (IMP-02 A-1 Stage 0 normalize chained adapter)
|
||
|
|
1dc81e0692 |
feat(step14+step21): add zone_geometries_px artifact (IMP-01 #1)
- Add slide-relative bbox export of .zone elements via getBoundingClientRect
- Inline Selenium JS collects zone_geometries_px = [{position, template_id, x, y, w, h}]
- write_debug_json adds top-level additive zone_geometries_px field
- Existing visual_runtime_check / zones / frame_slot_metrics / PASS/FAIL logic unchanged
- AI/Kei/V4/frame selection paths not touched
Refs Gitea #1 (IMP-01 A-6 Zone DOM 좌표 export)
|
||
|
|
6f1b1d9fa3 |
docs: add Phase Z implementation issue backlog
- Add docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md as implementation issue inventory (28 issues + frontend pending) bridged from PHASE-Q-INSIGHT-TO-22STEP-MAP.md - Sections: §1 22-step map (11) / §2 separate axis registry (9) / §3 audit §1 mapping correction (5) / §4 cleanup (3) / §5 frontend matching source pending - Includes review loop workflow (Codex+Claude review thread) + 8 labels + dependency convention (none/hard link/soft link) - Register the new doc in PHASE-Z-ROADMAP.md §8 |
||
|
|
783f8ca1ec |
docs: add Phase Q insight to 22-step map
- Add docs/architecture/PHASE-Q-INSIGHT-TO-22STEP-MAP.md as implementation prereq lock (audit + frontend matching insight → 22-step pipeline mapping + Archive guardrail) - Sections: §0 Purpose/Boundary (9 Archive markers) / §1 SoT Read Result / §2 22-step status & improvement map (23 rows × 7 columns, Block A/B/C subsections) / §3 Separate Axis Registry (9 axes) / §4 audit §1 Mapping Correction Candidates (5 catches) / §5 Cleanup Candidates (3) / §6 Frontend Matching Insight — Source Pending - Register the new doc in PHASE-Z-ROADMAP.md §8 (frontend matching insight marked as source pending) |
||
|
|
8fe16e9c04 |
docs: reorder Phase Q audit roadmap priorities
- Replace §4 placeholder with grouped priority table (↑ / 중 / ↓ / 별 axis) - Add §4 verification guardrail (no MDX / frame hardcoding) - Add A-2 / A-5 risk notes (catalog frame change allowed, fallback status semantics) - Update PHASE-Z-ROADMAP.md §5 inline with audit-derived priorities - Add §7-B mini summary table for 12 lens items and Step 16/17 retry axis |
||
|
|
c7abf61ef6 |
docs: write Phase Q audit salvage plan
- Summarize §2.1~§2.11 audit into 8 Salvage Candidate bundles - Fill §3-A lens table with A-1 through D-2 salvage/new-build decisions - Add §3-B deterministic Step 16/17 retry refinement axis - Keep Archive exclusions and detailed dual-write criteria out of §3 scope - Add §5-1 dated entry for 2026-05-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
b172c1b9f4 |
docs: add pipeline audit for legacy execution flow
- Classify pipeline.py as Archive-heavy with Salvage Candidate 0 - Record Phase Q/R'/T execution flow as outside Phase Z normal path - Mark deterministic pipeline utilities as Reference Only - Mark pipeline_context.py schema and lifecycle methods as Reference Only - Surface §1 B-1 as indirect surface, not direct composition planner - Add §5-1 dated entry for 2026-05-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
8b88757ade |
docs: add block_reference / selector audit (Reference Only + Archive)
- Classify §2.10 as Mixed with Salvage Candidate 0 - Mark utilities / matching helpers / Phase Q-2 filtering as Reference Only - Record block_reference high-level entries as Phase R' reference path Archive - Record block_selector format_candidates_for_prompt as Kei prompt formatter Archive - Surface §1 A-2 indirect, catalog duplication, block_selector legacy as separate axes - Add §5-1 dated entry for 2026-05-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
a0e4eda0ab |
docs: add html_generator audit as Phase R' Archive core
- Classify html_generator.py as Archive-heavy with Salvage Candidate 0 - Record AI HTML generation path as Phase R' Archive Candidate - Mark deterministic duplicate helpers as Reference Only - Surface A-3/A-4 mapping mismatch as a factual note - Add §5-1 dated entry for 2026-05-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
79cab1dcb9 |
docs: add renderer audit (Reference Only + Phase R' Archive)
- Classify renderer.py as Mixed with Salvage Candidate 0 - Mark Jinja/catalog/template rendering helpers as Reference Only - Record render_slide_from_html Phase R' path as Archive Candidate - Clarify A-3 as indirect preview render surface - Clarify A-4 as slide-base impact surface without conditional CSS implementation - Add §5-1 dated entry for 2026-05-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
1fedd4d0a0 |
docs: add content_verifier audit (Mixed Reference Only + Archive)
- Classify content_verifier.py as Mixed (Reference Only + Archive Candidate) - Mark deterministic utilities (text extraction, Korean normalization, verification logic) as Reference Only — Phase Z normal path direct slot absent - Mark Kei artifact detection (verify_no_forbidden_content + FORBIDDEN_KEI_MEMOS) and Kei AI generation retry loop (generate_with_retry) as Archive Candidate - Clarify L4 Selenium / L5 Opus vision are header documentation only (no implementation in this file) - Record no §3 Salvage application target (Salvage Candidate 0) - Surface §1 B-2 mapping as indirect; H1-H3 reference axis candidates, H4-H5 Archive markers, H6 L4/L5 factual note - Add §5-1 dated entry for 2026-05-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
02f727f04e |
docs: add content_editor audit as Archive Candidate
- Classify content_editor.py as Archive Candidate at module level - Document Kei AI direct slot-fill flow (fill_content / fill_candidates / EDITOR_PROMPT) - Mark Kei API infrastructure (_call_kei_editor_with_retry / _parse_json) as outside Phase Z normal path - Record no §3 Salvage Plan target for this module - Surface §1 B-1/B-2 candidate-file mapping mismatch and AI repair fallback infrastructure as separate axes - Add §5-1 dated entry for 2026-05-12 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
bf55a53633 |
docs: lock Phase Q audit pass 2 boundaries
- Add §0-B Audit scope lock and strengthen §0-0 invariants - Reclassify §2.5 F-3 deterministic budget assets as Reference Only - Remove invalid AI/Kei revival rows from §2.2/§2.4/§2.5 lens tables - Normalize §3/§4 legacy wording from Migrate/Delete vocabulary - Add §5-1 reclassification tags and factual drift update - Add pass 2 execution tracker document Verified with 13-pattern context-aware grep: positive misuse 0 within PHASE-Q-AUDIT.md pass 2 scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
3b6d86a73c |
docs: start Phase Q audit and lock salvage policy
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
b56fd20ae5 |
feat: add Phase Z override CLI and trace support
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
0a9327c50c |
PHASE-Z-ROADMAP refactor — Codex 검토 안 + Step 22 정정
§1 상단에 lock phrase blockquote 추가:
"현재 당장 할 일은 개발 진행이 아니라, 보고와 피드백을 위한
PROCESS_OVERVIEW.html 프로토타입을 먼저 만드는 것이다."
§2 — 토픽별 6 영역 → axis 명 list (Step 5 보완 / 6-A / 7-conn /
8-conn / Step 9 v0 / cleanup-1 / F29 / README / push 완료).
CHANGE-LOG reference 로 추적성 확보.
§3 — Step 22 추정 % 20% → 10% (UI 미시작 정합).
caveat 강화 (STATUS-BOARD 가 single source of truth 명시).
§4 — 큰 로드맵 7 단계 한 블록.
§5 — 우선순위 3 줄 분리 (1. 프로토타입 / 2. 보고 / 3. 복귀).
§6 — 보고용 프로토타입 계획 (포함 내용 / 목적) 별도 섹션.
§7 — Pipeline 복귀 후 Todo (MDX04 / 시각 점검 확장 / 어댑터 /
MDX 정규화 / Step 21 / MDX01 02 검증) 별도 섹션.
§8 — 문서 역할 분담 표 (README / OVERVIEW / STATUS-BOARD /
CHANGE-LOG / ROADMAP / PROCESS_OVERVIEW 6 문서).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
473de6b3d0 |
PHASE-Z-ROADMAP.md 신설 — 진행 계획 + 세부 todo
문서 역할 분담: - README : 프로젝트 개요 + 큰 그림 (가끔 갱신) - OVERVIEW : 22 단계 도면 (구조 잠금) - STATUS-BOARD : 각 단계 정확한 상태 (자주 갱신) - CHANGE-LOG : 결정 변경 이력 - ROADMAP (신규): 진행 계획 + 당장 할 일 + 세부 todo (자주 갱신) 내용: 1. 현재 위치 (MDX03 정상 경로 통과) 2. 지금까지 완료한 작업 6 가지 영역 3. 22 단계 진행 수준 (추정 % 표 + STATUS-BOARD 단일 출처 caveat) 4. 큰 로드맵 7 단계 5. 세부 todo (5.1 보고용 프로토타입 우선 / 5.2~5.8 단계별) 6. 당장 실행 순서 (보고용 프로토타입 → 22 단계 정리 복귀) 7. 문서 역할 분담 표 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
995101dadd |
README 통합 갱신: 한글 / 22-step Mermaid / 로드맵 Mermaid
- 1. 프로젝트 개요 + 핵심 용어 표 (MDX / V4 / Phase Z / Frame / Region / Slot) - 2. 22 단계 파이프라인 — 각 단계 별도 박스, 한글 라벨, 결정 분기 포함 - 3. 현재 완료 수준 — MDX03 정상 경로 통과, 진행 약 65~70% - 4. 향후 로드맵 — 7 단계 (한글 LR Mermaid + 단계별 상세) - 5. 운영 원칙 — 절대 원칙 / V4 ↔ Phase Z 책임 / 렌더 정책 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
85c680f02a |
docs + V4 catalog + samples + Phase Q legacy 보존
전체 26 files (20 추가 + 6 수정), 10507 insertions. Phase Z 문서 : - docs/architecture/PHASE-Z-CHANGE-LOG.md (신설) — axis-by-axis 의사결정 history (newest-on-top). Step 7-A 부터 6 entry 박힘 + 2026-05-08 / 2026-05-08 #2 (compat 매트릭스 폐기 / 6-B 폐기 / F14 표현 정정 / label gate policy 분리). - docs/architecture/PHASE-Z-PIPELINE-OVERVIEW.md (수정) — Step 5/6/9 Gap note append (구조 무변, append-only). 6-B 폐기 사실 + Refinement F. - docs/architecture/PHASE-Z-PIPELINE-STATUS-BOARD.md (수정) — snapshot date 2026-05-08 갱신. §3 핵심 missing item 5 (Step 5/6/9 boundary axis breakdown + 폐기 기록). §6 한 줄 갱신 — 다음 axis 후보 A~F. Project root docs : - PLAN.md / PROGRESS.md / README.md (수정) — 토큰 체계 / 폴더 구조 / 설계 문서 / 역할 분리 반영. - IMPROVEMENT-REDESIGN.md (신설) — Phase Z 설계 핵심 문서. - PROCESS_OVERVIEW.html (신설) — 파이프라인 개요 시각. - docs/tasks/* (신설) — Phase Z task 문서. V4 catalog (Phase Z runtime 필수 의존성) : - tests/matching/v4_full32_result.yaml (신설, 4888 줄) — V4 매칭 결과 32 frame × 10 MDX section. lookup_v4_match() / lookup_v4_candidates() 가 본 파일 read. Phase Z runtime 이 *없으면 즉시 abort* — clone 후 즉시 동작 가능 보장. Samples : - samples/mdx_batch/04.mdx (신설) — MDX04 기본 sample. - samples/mdx/04. DX 지연 요인.mdx (신설) — MDX04 원본. Phase Q legacy 보존 (별 axis "Phase Q audit & salvage" 영역) : - src/block_matcher_tfidf.py / catalog_blocks.py / frame_extractor.py / pipeline_v2.py — Phase Q (옛 파이프라인) src 신규 untracked 파일들. Phase Z runtime 와 의존성 0. Phase Q audit axis 에서 검토 예정. - scripts/eval_block_matcher.py / fetch_all_frame_screenshots.py / match_17_units_my_matcher.py / match_mdx_strict.py / match_mdx_to_frames_tfidf.py / ocr_augment_texts.py / run_pipeline_v2.py / previews/ — Phase Q 작업 시 사용한 옛 script. 같이 보존. - run_mdx03_pipeline.py (수정) — Phase Q 진입점 (no flag) + Phase Z 진입점 (--phase-z2 flag) 동시 wrapper. Phase Z 만 사용 시 `python -m src.phase_z2_pipeline samples/mdx_batch/03.mdx <run_id>` 직접 호출. 비-scope : - tests/matching/ (v4_full32_result.yaml 외 ~63MB) — V4 진화 history / reports / DECK / ATTACH. Phase Q audit axis 에서 검토. - tests/pipeline/ (~15MB) — pipeline data. Phase Q audit 영역. - templates/catalog/blocks.yaml — 옛 block catalog. Phase Q audit. - templates/phase_z2/frames/ — 옛 frame partial 위치. Phase Q audit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
ec83405770 |
phase z pipeline: Step 5 / 6-A / 7-conn / 8-conn / Step 9 v0 axis 박힘
사용자 lock 2026-05-08 — Step 5/6/9 boundary reframe.
V4 가 frame 선택, Step 6 은 V4 rank-1 default 전사, Step 9 는 application_plan
번역. compat 매트릭스 안 폐기.
src/phase_z2_pipeline.py 변경 :
- lookup_v4_candidates(v4, section_id, max_n=6) 추가 — V4 non-reject max-6
후보 list. raw 32 entry 는 v4_full32_result.yaml 영속, step05 = 정제 list.
lookup_v4_match() (rank-1) 유지 — Step 6 backward compat. (Step 5 보완)
- step05_v4_evidence.json schema 확장 — evidence_per_section[i] =
{section_id, v4_candidates: [...], candidate_status: "ok" |
"no_non_reject_v4_candidate"}. (Step 5 보완)
- candidates_lookup_fn 정의 + plan_composition() 에 주입.
V4 raw dict 는 composition module 안 봄 — fn injection. (Step 6-A)
- Step 6 artifact 의 selected_units[i] 에 v4_candidates 필드 추가. (Step 6-A)
- step07_layout.json data 에 unit_count + layout_candidates 필드 추가
(Step 7-B 의 select_layout_candidates 결과). step07_selected_layout.html
에 Layout Candidates 섹션 추가 (default / alternative / selected badge).
(Step 7-conn)
- step08_zone_region_ratios.json 의 per_zone_plan[i] 에 region_layout_candidates
+ display_strategy_candidates 필드 추가 (Step 8-B-1/2 후보 함수 호출).
step8_conn_placeholder_signals 명시 — Step 3/4 부재 종속 placeholder
(region_count=1, content_type="text_block"). step08 HTML 에 candidates pill +
placeholder caveat. (Step 8-conn)
- APPLICATION_MODE_BY_V4_LABEL 상수 추가 — V4 label → application_mode 변환.
- Step 9 v0 artifact block 신설 (~180 줄) — step09_application_plan.json +
.html. unit 별 layout_candidates / region_layout_candidates /
display_strategy_candidates / v4_candidates / candidate_status /
application_status / current_default_candidate / application_candidates 박힘.
invariant 5 가지 자연 만족 (status.md §4). (Step 9 v0)
src/phase_z2_composition.py 변경 :
- CompositionUnit 에 v4_candidates: list field 추가 (additive, logic 무변).
duck typed (V4Match-shape) — circular import 회피. (Step 6-A)
- collect_candidates() 에 v4_candidates_lookup_fn 인자 추가. 3 분기
(single / parent_merged / parent_merged_inferred) 에서 v4_candidates 채움.
(Step 6-A)
- plan_composition() 도 v4_candidates_lookup_fn pass-through. (Step 6-A)
- stale "pipeline 호출처 X" 주석 정정 (3 곳: select_layout_candidates /
select_region_layout_candidates / select_display_strategy_candidates +
catalog header 2 곳). Step 7-conn / 8-conn 으로 호출처 박혀 *호출처 X* 사실
위배. (cleanup-1)
axis 닫힘 : Step 5 보완 + 6-A + 7-conn + 8-conn + Step 9 v0 + cleanup-1.
폐기 : 6-B (frame ownership transfer — misframed axis. PHASE-Z-CHANGE-LOG.md
2026-05-08 #2 entry 참조).
regression 0 : MDX03 fresh run 검증 — final.html / step10/12/13/20 byte-동일.
schema 확장만 (step05/06/07/08/09).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
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> |
||
|
|
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>
|