IMP-41 frame ranking label UI 차별 (배지 + tooltip) #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
관련 step: frontend FramePanel
source: #43 I8 (frame ranking 의 label 별 UI 시각 차별)
roadmap axis: R5 (프론트엔드)
wave: 2
priority: 중
dependency: #38 (IMP-29 frontend evidence bridge) verified, #10 (filtered_section_reasons UI) verified, #11 (Frame min_height 표시) verified
scope:
APPLICATION_MODE_BY_V4_LABEL매핑 정보 frontend 에 forward (Step 9 에서 가능)out of scope:
guardrail / validation:
cross-ref:
Front/client/src/components/FramePanel.tsxreview loop:
[Claude #1] Stage 1 problem review — IMP-41 frame ranking label UI 차별 (배지 + tooltip)
Current state verification (what already exists vs what's missing)
A — V4 label color badges (issue spec item #1) — ALREADY IMPLEMENTED
Verified path
Front/client/src/components/FramePanel.tsx:238-253:Color spec matches issue 1:1. No recolor required.
B — Tooltip on V4 label badge (issue spec item #2) — PARTIAL
Verified path
Front/client/src/components/FramePanel.tsx:249:Current tooltip = raw label string only. Does not convey selection consequence ("코드 직접 적용" / "AI 보강 필요" / "AI restructure 필요" / "render path 제외") the issue asks for.
Composite tooltip at FramePanel.tsx:128-144 (
composedTitle, on the outer<button>) already aggregates reject / catalog-missing / filtered / candidate_evidence lines, but neither it nor the inline V4 badge title surfacesapplication_modesemantics.C —
APPLICATION_MODE_BY_V4_LABELforwarding (issue spec item #3) — NOT WIREDBackend mapping (single source of truth) lives at
src/phase_z2_pipeline.py:107-112:Step 9 already emits per-candidate
application_mode/auto_applicable/delegated_tointounit.application_candidates[]— verified atsrc/phase_z2_pipeline.py:3071-3092(_application_candidates_for_unit) + emitted at the application_plan unit atsrc/phase_z2_pipeline.py:3227. Fixture proof:Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json:58, 67, 113, 122all carry"application_mode": "...".Frontend bridge
Front/client/src/services/designAgentApi.ts:484-562iterates the sameunitsarray (line 484applicationPlan.data?.units) and consumesunit.candidate_evidence/unit.v4_all_judgments/unit.v4_candidatesto buildFrameCandidate[], but does not readunit.application_candidatesanywhere. As a result,FrameCandidatetype (Front/client/src/types/designAgent.ts:137-178) carrieslabel,routeHint,phaseZStatus,decision,reason,capacityFit— but noapplicationMode/autoApplicable.So the data is already at the wire (Step 9 JSON) and reaches the bridge function; it is just dropped on the floor before FrameCandidate construction.
D — Dependency status
#38(IMP-29 frontend evidence bridge) — verified. The candidate_evidence join scaffolding is already present atdesignAgentApi.ts:511-562. Adding application_mode is a per-template_id sibling join — same shape.#10(filtered_section_reasons UI) — verified. Independent surface; no conflict.#11(Frame min_height 표시) — verified. Sibling badge already on FrameCandidate; pattern proven (additive, optional field, silent degradation on missing data).All three deps locked, no waits.
Root cause summary
Step 9 forwards
application_modecorrectly, the FramePanel renders label color badges correctly, but the frontend bridge does not projectapplication_modeontoFrameCandidate. Hence FramePanel has no signal to display the human-readable selection-consequence tooltip that distinguishesuse_as_is(직접 적용) fromlight_edit(deterministic same-frame adjustment) fromrestructure(human_review delegated) fromreject(excluded from render).Scope-lock (3 units, frontend-only, deterministic)
Front/client/src/types/designAgent.ts(FrameCandidate at L137-178)applicationMode?: 'direct_insert' | 'same_frame_with_adjustment' | 'layout_or_region_change' | 'exclude',autoApplicable?: boolean,delegatedTo?: 'step10_contract_check' | 'human_review' | nullapplication_candidatessilently degrade —applicationMode === undefined→ existing generic tooltip.Front/client/src/services/designAgentApi.ts(bridge L484-562)Map<template_id, application_candidate>fromunit.application_candidates ?? []; for eachFrameCandidatelookup bytemplate_idand populate the 3 U1 fields.Front/client/src/components/FramePanel.tsx(V4 label badge L238-253)V4 label: ${candidate.label}with deterministic const-mapped human-readable tooltip including application_mode meaning. ConstAPPLICATION_MODE_TOOLTIP_BY_MODE(module-scope) — 4 entries keyed onapplicationMode. Fallback to existingV4 label: ${label}whenapplicationMode === undefined.Guardrails
src/change = 0.APPLICATION_MODE_BY_V4_LABELstays atsrc/phase_z2_pipeline.py:107-112as single source of truth; Step 9 already emits the mapped values. Frontend join is pure read of an existing key.applicationMode(enum value). Noif (template_id === ...)/if (frame_id === ...)/ no per-mdx branching anywhere.application_candidates) silently degrade to current behavior.bg-emerald-100/bg-blue-100/bg-amber-100/bg-red-100retained — already matches issue spec.application_candidates(mdx03_f29_fix_check confirmed above) AND a fixture path that does not (pre-IMP-05 mock atFront/client/src/data/mockDesignAgentData.ts:152— assert graceful undefined → fallback tooltip).samples/mdx*/+Front/client/src/data/payloads unchanged. No new sample consumed (feedback_sample_budget).Test / verify plan (preview for Stage 2)
src/change.application_candidates→ assert returnedFrameCandidate.applicationMode === "direct_insert"for theuse_as_iscandidate. Repository today has no frontend test infra → may degrade to a deterministic manual check (Stage 2 to confirm path).?mdx=03(mdx03_f29_fix_check has application_candidates) → hover each V4 label badge in FramePanel → confirm 4 distinct tooltip strings appear, one per label. Also load a fixture / mock without application_candidates → confirm tooltip falls back toV4 label: ${label}(no crash, no empty string).Out of scope (deferred)
src/phase_z2_pipeline.py:104-112. Untouched.#61 IMP-33+#76 IMP-47B. This IMP only labels what the AI route would do; it does not call AI.titleattribute already used elsewhere in this component).Open questions (for Stage 2)
delegatedTo("step10_contract_check" / "human_review") explicitly, or only the application_mode? Recommendation: includedelegatedToonly when value ≠ "step10_contract_check" (i.e., surface "human_review" for restructure, omit for use_as_is/light_edit). Keeps default tooltip terse for the common path.applicationMode === "exclude"(reject) tooltip duplicate the existing "V4 reject — render path 비추천" line already incomposedTitle(FramePanel.tsx:140), or only annotate the inline label badge? Recommendation: only inline badge gains the explanatory string;composedTitleouter tooltip stays as-is (no duplication).template_id. Confirm collision behavior when V4 produces duplicate template_ids across ranks. Readingsrc/phase_z2_pipeline.py:836-868(IMP-05 L4 dedup): first occurrence claims template_id; later duplicates skipped. Step 9application_candidatesfollows the same per-v4_candidatesorder (non-reject only) → in practice each template_id appears at most once. Stage 2 to confirm or add Map-first-wins note.ready-for-stage-2
[Claude #1] Stage 1 problem review — IMP-41 frame ranking label UI 차별 (배지 + tooltip)
Current state verification (what already exists vs what's missing)
A — V4 label color badges (issue spec item #1) — ALREADY IMPLEMENTED
Verified path
Front/client/src/components/FramePanel.tsx:238-253:Color spec matches issue 1:1. No recolor required.
B — Tooltip on V4 label badge (issue spec item #2) — PARTIAL
Verified path
Front/client/src/components/FramePanel.tsx:249:Current tooltip = raw label string only. Does not convey selection consequence ("코드 직접 적용" / "AI 보강 필요" / "AI restructure 필요" / "render path 제외") the issue asks for.
Composite tooltip at FramePanel.tsx:128-144 (
composedTitle, on the outer<button>) already aggregates reject / catalog-missing / filtered / candidate_evidence lines, but neither it nor the inline V4 badge title surfacesapplication_modesemantics.C —
APPLICATION_MODE_BY_V4_LABELforwarding (issue spec item #3) — NOT WIREDBackend mapping (single source of truth) lives at
src/phase_z2_pipeline.py:107-112:Step 9 already emits per-candidate
application_mode/auto_applicable/delegated_tointounit.application_candidates[]— verified atsrc/phase_z2_pipeline.py:3071-3092(_application_candidates_for_unit) + emitted at the application_plan unit atsrc/phase_z2_pipeline.py:3227. Fixture proof:Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json:58, 67, 113, 122all carry"application_mode": "...".Frontend bridge
Front/client/src/services/designAgentApi.ts:484-562iterates the sameunitsarray (line 484applicationPlan.data?.units) and consumesunit.candidate_evidence/unit.v4_all_judgments/unit.v4_candidatesto buildFrameCandidate[], but does not readunit.application_candidatesanywhere. As a result,FrameCandidatetype (Front/client/src/types/designAgent.ts:137-178) carrieslabel,routeHint,phaseZStatus,decision,reason,capacityFit— but noapplicationMode/autoApplicable.So the data is already at the wire (Step 9 JSON) and reaches the bridge function; it is just dropped on the floor before FrameCandidate construction.
D — Dependency status
#38(IMP-29 frontend evidence bridge) — verified. The candidate_evidence join scaffolding is already present atdesignAgentApi.ts:511-562. Adding application_mode is a per-template_id sibling join — same shape.#10(filtered_section_reasons UI) — verified. Independent surface; no conflict.#11(Frame min_height 표시) — verified. Sibling badge already on FrameCandidate; pattern proven (additive, optional field, silent degradation on missing data).All three deps locked, no waits.
Root cause summary
Step 9 forwards
application_modecorrectly, the FramePanel renders label color badges correctly, but the frontend bridge does not projectapplication_modeontoFrameCandidate. Hence FramePanel has no signal to display the human-readable selection-consequence tooltip that distinguishesuse_as_is(직접 적용) fromlight_edit(deterministic same-frame adjustment) fromrestructure(human_review delegated) fromreject(excluded from render).Scope-lock (3 units, frontend-only, deterministic)
Front/client/src/types/designAgent.ts(FrameCandidate at L137-178)applicationMode?: 'direct_insert' | 'same_frame_with_adjustment' | 'layout_or_region_change' | 'exclude',autoApplicable?: boolean,delegatedTo?: 'step10_contract_check' | 'human_review' | nullapplication_candidatessilently degrade —applicationMode === undefined→ existing generic tooltip.Front/client/src/services/designAgentApi.ts(bridge L484-562)Map<template_id, application_candidate>fromunit.application_candidates ?? []; for eachFrameCandidatelookup bytemplate_idand populate the 3 U1 fields.Front/client/src/components/FramePanel.tsx(V4 label badge L238-253)V4 label: ${candidate.label}with deterministic const-mapped human-readable tooltip including application_mode meaning. ConstAPPLICATION_MODE_TOOLTIP_BY_MODE(module-scope) — 4 entries keyed onapplicationMode. Fallback to existingV4 label: ${label}whenapplicationMode === undefined.Guardrails
src/change = 0.APPLICATION_MODE_BY_V4_LABELstays atsrc/phase_z2_pipeline.py:107-112as single source of truth; Step 9 already emits the mapped values. Frontend join is pure read of an existing key.applicationMode(enum value). Noif (template_id === ...)/if (frame_id === ...)/ no per-mdx branching anywhere.application_candidates) silently degrade to current behavior.bg-emerald-100/bg-blue-100/bg-amber-100/bg-red-100retained — already matches issue spec.application_candidates(mdx03_f29_fix_check confirmed above) AND a fixture path that does not (pre-IMP-05 mock atFront/client/src/data/mockDesignAgentData.ts:152— assert graceful undefined → fallback tooltip).samples/mdx*/+Front/client/src/data/payloads unchanged. No new sample consumed (feedback_sample_budget).Test / verify plan (preview for Stage 2)
src/change.application_candidates→ assert returnedFrameCandidate.applicationMode === "direct_insert"for theuse_as_iscandidate. Repository today has no frontend test infra → may degrade to a deterministic manual check (Stage 2 to confirm path).?mdx=03(mdx03_f29_fix_check has application_candidates) → hover each V4 label badge in FramePanel → confirm 4 distinct tooltip strings appear, one per label. Also load a fixture / mock without application_candidates → confirm tooltip falls back toV4 label: ${label}(no crash, no empty string).Out of scope (deferred)
src/phase_z2_pipeline.py:104-112. Untouched.#61 IMP-33+#76 IMP-47B. This IMP only labels what the AI route would do; it does not call AI.titleattribute already used elsewhere in this component).Open questions (for Stage 2)
delegatedTo("step10_contract_check" / "human_review") explicitly, or only the application_mode? Recommendation: includedelegatedToonly when value ≠ "step10_contract_check" (i.e., surface "human_review" for restructure, omit for use_as_is/light_edit). Keeps default tooltip terse for the common path.applicationMode === "exclude"(reject) tooltip duplicate the existing "V4 reject — render path 비추천" line already incomposedTitle(FramePanel.tsx:140), or only annotate the inline label badge? Recommendation: only inline badge gains the explanatory string;composedTitleouter tooltip stays as-is (no duplication).template_id. Confirm collision behavior when V4 produces duplicate template_ids across ranks. Readingsrc/phase_z2_pipeline.py:836-868(IMP-05 L4 dedup): first occurrence claims template_id; later duplicates skipped. Step 9application_candidatesfollows the same per-v4_candidatesorder (non-reject only) → in practice each template_id appears at most once. Stage 2 to confirm or add Map-first-wins note.ready-for-stage-2
[Codex #1] Stage 1 problem review IMP-41
Scope-lock verification:
Backend application-mode mapping exists and is already emitted by Step 9.
D:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.py:107definesAPPLICATION_MODE_BY_V4_LABELwith the expected four labels:use_as_is -> direct_insert,light_edit -> same_frame_with_adjustment,restructure -> layout_or_region_change,reject -> exclude._application_candidates_for_unit()atD:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.py:3071reads that mapping and emitsapplication_mode,auto_applicable, anddelegated_to._application_plan_unit()includes the resultingapplication_candidatesatD:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.py:3227.Wire/fixture proof exists.
D:\ad-hoc\kei\design_agent\Front\client\public\data\runs\mdx03_f29_fix_check\steps\step09_application_plan.json:53and:108contain per-unitapplication_candidates; sample entries at lines58-61,67-70,113-116, and122-125carry the expectedapplication_mode,auto_applicable, anddelegated_tofields.Frontend bridge drops the Step 9 application candidate fields.
D:\ad-hoc\kei\design_agent\Front\client\src\services\designAgentApi.ts:484readsapplicationPlan.data?.units. The candidate merge at lines511-523consumes onlyunit.candidate_evidence,unit.v4_all_judgments, andunit.v4_candidates;unit.application_candidatesis not read. TheFrameCandidateconstruction at lines530-562forwards label/evidence fields but notapplication_mode,auto_applicable, ordelegated_to.Frontend type is missing the forwarded fields.
D:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.ts:137-178definesFrameCandidatewith label, catalog/min-height fields, route/evidence fields, and capacity fit, but noapplicationMode,autoApplicable, ordelegatedToequivalent.FramePanel label UI is partially present, not complete.
D:\ad-hoc\kei\design_agent\Front\client\src\components\FramePanel.tsx:238-252renders a label badge with the expected color families foruse_as_is,light_edit,restructure, and fallback/reject. However, those styles are inline conditional branches at lines241-247, not a named label-to-style constant. The implementation stage should extract a deterministic label UI mapping constant to satisfy the issue guardrail.Tooltip semantics are incomplete.
The badge title at
D:\ad-hoc\kei\design_agent\Front\client\src\components\FramePanel.tsx:249is onlyV4 label: ${candidate.label}. The composed card tooltip at lines128-144includes catalog/filter/reject/evidence information, but does not expose application-mode consequences such as direct code application, AI adjustment required, AI restructure required, or exclusion.Wrong assumptions / missing files:
FramePanel.tsx,designAgentApi.ts,designAgent.ts,phase_z2_pipeline.py, and the checked Step 9 fixture all exist.FrameCandidate.Scope-locked implementation surface:
D:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.ts: add optional application-mode fields toFrameCandidate.D:\ad-hoc\kei\design_agent\Front\client\src\services\designAgentApi.ts: mergeunit.application_candidatesinto frontend candidates by stable candidate key, preserving deterministic source priority and avoiding frame-specific branching.D:\ad-hoc\kei\design_agent\Front\client\src\components\FramePanel.tsx: add label/application-mode mapping constants and use them for badge styles and tooltip text.=== EVIDENCE ===
Commands run:
Get-Content -LiteralPath 'D:\ad-hoc\kei\design_agent\.orchestrator\tmp\codex_prompt.txt'rg -n "APPLICATION_MODE_BY_V4_LABEL|def _application_candidates_for_unit|application_candidates" src/phase_z2_pipeline.pyrg -n "application_candidates|candidate_evidence|v4_all_judgments|FrameCandidate|applicationMode|autoApplicable|delegated" Front/client/src/services/designAgentApi.ts Front/client/src/types/designAgent.ts Front/client/src/components/FramePanel.tsxrg -n "application_mode|auto_applicable|delegated_to" Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.jsonGet-Contentline-window checks forsrc\phase_z2_pipeline.py,Front\client\src\services\designAgentApi.ts,Front\client\src\types\designAgent.ts, andFront\client\src\components\FramePanel.tsxrg -n "application_candidates|application_mode|auto_applicable|delegated_to|FrameCandidate\[\]|label ===|title=\{V4 label" Front/client/src/services/designAgentApi.ts Front/client/src/types/designAgent.ts Front/client/src/components/FramePanel.tsx Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json src/phase_z2_pipeline.py`Test-Pathchecks for all referenced filesgit status --shortFiles checked:
D:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.pyD:\ad-hoc\kei\design_agent\Front\client\src\services\designAgentApi.tsD:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.tsD:\ad-hoc\kei\design_agent\Front\client\src\components\FramePanel.tsxD:\ad-hoc\kei\design_agent\Front\client\public\data\runs\mdx03_f29_fix_check\steps\step09_application_plan.jsonTest results:
Verified facts:
unit.application_candidates.FrameCandidatehas no application-mode fields.FramePanel.tsx, so implementation should replace it with a constant mapping.FINAL_CONSENSUS: YES
[Claude #2] Stage 2 simulation-plan — IMP-41 frame ranking label tooltip
=== IMPLEMENTATION_UNITS ===
summary: Extend FrameCandidate type with applicationMode / autoApplicable / delegatedTo (all optional)
files: [Front/client/src/types/designAgent.ts]
tests: [npm --prefix Front run check]
estimate_lines: 18
summary: Merge unit.application_candidates[] in designAgentApi.ts; forward 3 fields onto matching FrameCandidate by template_id
files: [Front/client/src/services/designAgentApi.ts]
tests: [npm --prefix Front run check]
estimate_lines: 28
summary: Replace V4 label badge title (FramePanel.tsx:249) with applicationMode → Korean consequence phrase tooltip; legacy fallback preserved
files: [Front/client/src/components/FramePanel.tsx]
tests: [npm --prefix Front run check]
estimate_lines: 22
=== ISSUE AXIS COVERAGE ===
per-unit rationale:
V4 ${label} — ${koPhrase}. When applicationMode undefined (legacy/pre-IMP-05 fixture), keep existingV4 label: ${label}as fallback. Map keyed by application_mode (NOT label) per Stage 1 guardrail — backend remains source of truth.=== UNRESOLVED QUESTIONS RESOLUTION ===
=== OUT OF SCOPE (Stage 1 reconfirmed) ===
=== ROLLBACK ===
3 files, additive optional type fields, parallel enrichment merge, single tooltip string swap with legacy fallback. Rollback =
git checkout HEAD~ -- Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.ts Front/client/src/components/FramePanel.tsx. No DB / no fixture / no backend touch. Pre-IMP-05 fixtures (which lack unit.application_candidates) silently fall through to current behavior — no regression vector.=== EVIDENCE ===
application_candidates[]withtemplate_id,application_mode,auto_applicable,delegated_topopulated; no backend work requiredtitle={\V4 label: ${candidate.label}`}`)"check": "tsc --noEmit") — no frontend test runner exists, so per-unit verification = tsc + fixture tracea06dd3dFINAL_CONSENSUS: YES
[Codex #2] Stage 2 simulation-plan review - IMP-41 frame ranking label tooltip
=== IMPLEMENTATION_UNITS ===
summary: Extend FrameCandidate with optional applicationMode / autoApplicable / delegatedTo fields.
files: [Front/client/src/types/designAgent.ts]
tests: [npm --prefix Front run check, pytest -q tests]
estimate_lines: 18
verdict: covered
summary: Read unit.application_candidates[] in designAgentApi.ts and enrich matching candidates by template_id without changing candidate source priority.
files: [Front/client/src/services/designAgentApi.ts]
tests: [npm --prefix Front run check, pytest -q tests]
estimate_lines: 28
verdict: covered
summary: Replace only the V4 label badge title with an applicationMode consequence tooltip and preserve the legacy fallback when mode is absent.
files: [Front/client/src/components/FramePanel.tsx]
tests: [npm --prefix Front run check, pytest -q tests]
estimate_lines: 22
verdict: covered
Per-unit rationale:
Out-of-scope notes:
Rollback strategy:
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
a06dd3d4b0.rewind_target: stage_2_plan
FINAL_CONSENSUS: NO
[Claude #3] Stage 2 simulation-plan r2 — IMP-41 frame ranking label tooltip (rewind: stage_2_plan)
=== IMPLEMENTATION_UNITS ===
summary: Extend FrameCandidate with optional applicationMode / autoApplicable / delegatedTo fields.
files: [Front/client/src/types/designAgent.ts]
tests: [npm --prefix Front run check]
estimate_lines: 18
summary: Read unit.application_candidates[] in designAgentApi.ts and enrich matching candidates by template_id without changing source priority.
files: [Front/client/src/services/designAgentApi.ts]
tests: [npm --prefix Front run check]
estimate_lines: 28
summary: Replace V4 label badge title (FramePanel.tsx:249) with applicationMode → Korean consequence tooltip; legacy fallback preserved when mode absent.
files: [Front/client/src/components/FramePanel.tsx]
tests: [npm --prefix Front run check]
estimate_lines: 22
=== ISSUE AXIS COVERAGE ===
Per-unit rationale:
V4 ${label} — ${koPhrase}. When applicationMode undefined (pre-IMP-05 fixture / legacy), fall back to currentV4 label: ${label}. No re-derivation of mode from label in frontend (Stage 1 guardrail).=== UNRESOLVED QUESTIONS RESOLUTION ===
=== TEST CONTRACT (scope-qualified per RULE 4) ===
npm --prefix Front run check(tsc --noEmit).git diff src/phase_z2_pipeline.py). This is pre-existing IMP-47B working-tree noise, NOT introduced by IMP-41 frontend changes. Stage 4 verification = no NEW pytest failures introduced beyond this baseline.=== OUT OF SCOPE (Stage 1 reconfirmed) ===
=== ROLLBACK ===
3 files, additive optional type fields + parallel enrichment merge + single tooltip string swap with legacy fallback. Rollback =
git checkout <pre-merge> -- Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.ts Front/client/src/components/FramePanel.tsx. No DB / fixture / backend touch. Pre-IMP-05 fixtures (lacking unit.application_candidates) silently fall through to current tooltip — no regression vector.=== EVIDENCE ===
title={V4 label: ${candidate.label}})"check": "tsc --noEmit") — frontend type-only verification; no frontend test runner existsgit diff src/phase_z2_pipeline.pyshows IMP-47B u1 (2026-05-21) changed reject disposition comment at :576-580 (formerly "design reference only"). The orchestrator anchor test at tests/orchestrator_unit/test_imp17_comment_anchor.py was last re-pinned 2026-05-20 (IMP-30 u1 shift) to lines 570/571 and has drifted again. NOT introduced by IMP-41.a06dd3d(HEAD at Stage 1 review)npm --prefix Front run check(dropped erroneous pytest entries from Codex r1's units block); (b) explicit TEST CONTRACT section documenting scope-qualified verification + IMP-47B baseline acknowledgement.FINAL_CONSENSUS: YES
[Claude #4] Stage 2 simulation-plan r1 — IMP-41 frame ranking label tooltip (rewind: pytest baseline scope-qualification)
=== IMPLEMENTATION_UNITS ===
summary: Extend FrameCandidate with optional applicationMode / autoApplicable / delegatedTo fields.
files: [Front/client/src/types/designAgent.ts]
tests: [npm --prefix Front run check]
estimate_lines: 18
summary: Read unit.application_candidates[] in designAgentApi.ts; enrich matching FrameCandidate by template_id without changing source priority.
files: [Front/client/src/services/designAgentApi.ts]
tests: [npm --prefix Front run check]
estimate_lines: 28
summary: Replace V4 label badge title (FramePanel.tsx:249) with applicationMode → Korean consequence tooltip; legacy fallback preserved when mode absent.
files: [Front/client/src/components/FramePanel.tsx]
tests: [npm --prefix Front run check]
estimate_lines: 22
=== ISSUE AXIS COVERAGE ===
Per-unit rationale:
V4 label: ${label}.Unresolved-question resolution:
Out-of-scope:
=== TEST CONTRACT (scope-qualified per RULE 4) ===
npm --prefix Front run check(= tsc --noEmit per Front/package.json:11). Catches u1 type breakage, u2 missing forwarding, u3 fallback narrowing.Rollback:
=== EVIDENCE ===
Commands run:
a06dd3d4b0Verified facts:
title={V4 label: ${candidate.label}}— raw label only.FINAL_CONSENSUS: YES
[Codex #3] Stage 2 simulation-plan review - IMP-41 frame ranking label tooltip
=== IMPLEMENTATION_UNITS ===
summary: Extend FrameCandidate with optional applicationMode / autoApplicable / delegatedTo fields.
files: [Front/client/src/types/designAgent.ts]
tests: [npm --prefix Front run check, pytest -q tests]
estimate_lines: 18
verdict: covered
summary: Read unit.application_candidates[] in designAgentApi.ts; enrich matching FrameCandidate objects by template_id without changing candidate source priority.
files: [Front/client/src/services/designAgentApi.ts]
tests: [npm --prefix Front run check, pytest -q tests]
estimate_lines: 28
verdict: covered
summary: Replace only the V4 label badge title with an applicationMode consequence tooltip and preserve the legacy fallback when mode is absent.
files: [Front/client/src/components/FramePanel.tsx]
tests: [npm --prefix Front run check, pytest -q tests]
estimate_lines: 22
verdict: covered
Per-unit rationale:
Out-of-scope notes:
Rollback strategy:
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
a06dd3d4b0.FINAL_CONSENSUS: YES
[Claude #5] Stage 3 code-edit r1 — IMP-41 u1 (FrameCandidate type extension)
Executing unit: u1
■ unit_executed
FrameCandidatewith optionalapplicationMode/autoApplicable/delegatedTofields so the frontend type surface mirrors backend Step 9unit.application_candidates[]emit.■ files_changed
■ diff_summary
Net change: +13 lines (3 optional fields + 4 doc lines + 1 section comment + 5 anchoring lines). Mirrors the
minHeightPxoptional-field precedent atFront/client/src/types/designAgent.ts:150. String-literal union forapplicationModeis the verbatim value set emitted byAPPLICATION_MODE_BY_V4_LABELatsrc/phase_z2_pipeline.py:107-112.delegatedTois typedstring | null(open vocabulary — backend currently emits"step10_contract_check"/"human_review"/null; matches Stage 2 guardrail "delegatedTo is forwarded by type/bridge only, no tooltip use in this scope").■ scope_adherence
Front/client/src/types/designAgent.ts).designAgentApi.ts(= u2) orFramePanel.tsx(= u3).FrameCandidatefields, V4 label badge color axis, composite outer-button tooltip, route-hint chip, or non-FramePanel surfaces.■ baseline_verification
npm --prefix Front run check(post-edit) → only pre-existing TS2305 inclient/src/components/BottomActions.tsx(11,10)re:serializeSlidePlan(unrelated to IMP-41 axis).git stashbaseline (no IMP-41 edits) → confirmed pre-existing, NOT introduced by u1.pytest -q testsnot run for u1 — type-only frontend change, backend unaffected. Stage 4 verify will run it once all three units land.■ guardrail_checkpoint (Stage 2 lock)
APPLICATION_MODE_BY_V4_LABELkeys; not a frontend-authored consequence map.■ remaining_units
designAgentApi.ts: readunit.application_candidates[], index bytemplate_id, enrich matchingFrameCandidateobjects without changing source priority / sorting / TOP_N slicing.FramePanel.tsx: replace V4 label badgetitleat FramePanel.tsx:249 withapplicationMode-keyed Korean consequence tooltip; preserveV4 label: ${label}fallback whenapplicationModeis absent.■ follow_up_issue_candidates
None this turn. Stage 2 out-of-scope list (backend
APPLICATION_MODE_BY_V4_LABELaudit, Step 12 AI restructure delegation visualization, composite outer-button tooltip + route-hint chip surfaces, non-FramePanel surface propagation) already enumerated; no new axes surfaced during u1 implementation.■ evidence
src/phase_z2_pipeline.py:107-112(APPLICATION_MODE_BY_V4_LABEL),:3071-3092(_application_candidates_for_unit).Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json:53-72,108-127— valuesdirect_insert/same_frame_with_adjustment/layout_or_region_changeplusstep10_contract_check/human_reviewconfirmed.Front/client/src/types/designAgent.ts:150(minHeightPx?: number) — same comment-anchored pattern reused.source_comment_ids: [Claude #4] (Stage 2 simulation-plan r1), [Codex #3] (Stage 2 simulation-plan review YES)
commit_sha:
a06dd3d(Stage 3 in-progress; no commit yet — orchestrator gates Stage 5)STOP after this comment per Stage 3 single-unit rule. u2 and u3 pending in subsequent Stage 3 turns.
[Codex #4] Stage 3 code-edit review - IMP-41 u1
Review result: u1 is correct and scope-locked.
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
Remaining units: [u2, u3]
rewind_target: continue_same
FINAL_CONSENSUS: NO
[Claude #6] Stage 3 code-edit r2 — IMP-41 u2 (API bridge enrichment)
Executing unit: u2
■ unit_executed
unit.application_candidates[](Step 9 emit) indesignAgentApi.ts; index bytemplate_id; enrich matchingFrameCandidateobjects withapplicationMode/autoApplicable/delegatedTobefore slice + map. Enrichment-only — candidate source priority, label-priority sort, andTOP_N_FRAMES = 6slicing all unchanged.■ files_changed
■ diff_summary
Net change: +24 lines on
designAgentApi.ts(index Map block + per-candidate enrichment block + 3 forwarding lines, plus closure-shape adjustment from(c) => ({…})to(c) => { const appMatch = …; return ({…}); }).■ scope_adherence
Front/client/src/services/designAgentApi.ts).designAgent.ts(= u1, already committed in this stage) orFramePanel.tsx(= u3, pending).candidateMap/pushCandidate/LABEL_PRIORITY/v4Sourcesort /TOP_N_FRAMESslice all unchanged — enrichment runs strictly after the sort+slice boundary.applicationModeMapis a SECOND map distinct fromcandidateMap— it does NOT feedpushCandidateand therefore cannot enter the candidate source pipeline (Stage 2 guardrail "u2 must not change candidate source priority").■ enrichment_semantics
template_id(string). Verified backend emit:phase_z2_pipeline.py:_application_candidates_for_unit()writestemplate_idper entry, and fixtureFront/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json:55,64,110,119confirms the key shape.applicationMode←application_mode(raw string, may be undefined if backend omitted).autoApplicable←auto_applicable(raw boolean, may be undefined).delegatedTo←delegated_to ?? null(open vocabulary; backend currently emits"step10_contract_check"/"human_review"; null when absent — matchesstring | nullin u1 type).unit.application_candidatesabsent (legacy fixtures pre-IMP-32) → empty Map → all three fieldsundefinedon every candidate → FramePanel (u3) falls back to legacyV4 label: ${label}tooltip.■ baseline_verification
npm --prefix Front run check(post-u2-edit) → only the pre-existing TS2305 inclient/src/components/BottomActions.tsx(11,10)re:serializeSlidePlan. Same error confirmed on stage-baseline (a06dd3d) by Codex r1 — pre-existing, unrelated to IMP-41.pytest -q testsnot run for u2 — frontend-only enrichment, no backend change. Per Stage 2 plan, baseline parity expected (no backend behavioral change introduced).■ remaining_units
FramePanel.tsxV4 label badgetitle→applicationModeconsequence tooltip (Korean phrase keyed by application_mode VALUE, fallback to legacyV4 label: ${label}whenapplicationModeundefined).■ follow_up_issue_candidates
■ guardrail_self_check
application_mode(not a frontend label→mode map).npm run checkBottomActions.tsx error reproduces ona06dd3d, not introduced by u2.[Codex #5] Stage 3 code-edit review - IMP-41 u2
Review result: u2 is correct and scope-locked.
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
Remaining units: [u3]
rewind_target: continue_same
FINAL_CONSENSUS: NO
[Claude #7] Stage 3 code-edit r3 — IMP-41 u3 (FramePanel V4-label-badge tooltip)
Executing unit: u3
■ unit_executed
titleonFramePanel.tsxwith anapplicationMode-keyed Korean consequence tooltip. Fallback to the legacyV4 label: ${label}string whenapplicationModeis undefined (legacy fixtures pre-IMP-32 or candidates filtered out at Step 9). Korean consequence map declared at module scope, keyed byapplication_modeVALUE (backend authoritative), NOT V4 label.■ files_changed
■ diff_summary
Net change: +28 lines on
Front/client/src/components/FramePanel.tsx(12-line module-scope const block including 7 doc lines + 5 map lines; IIFE wrap around the existing badge JSX adding 8 control-flow lines + 8 doc/derivation lines; same<span>className mapping preserved verbatim).The tooltip text format is
"{Korean consequence} ({application_mode value})"so the human-readable phrase and the raw backend mode token are both visible on hover. The badge color mapping (FramePanel.tsx:262-269) is preserved identically — only thetitleattribute axis was changed, per Stage 2 scope-lock.■ scope_adherence
Front/client/src/components/FramePanel.tsx).designAgent.ts(= u1, completed r1) ordesignAgentApi.ts(= u2, completed r2).composedTitle, FramePanel.tsx:128-144) NOT modified — different axis per Stage 1 scope-lock.delegatedTois forwarded by type (u1) + bridge (u2) but NOT surfaced in this tooltip per Stage 2 guardrail.application_modeVALUE only, no frontend re-derivation from V4 label (Stage 2 AI-isolation guardrail).APPLICATION_MODE_BY_V4_LABEL(src/phase_z2_pipeline.py:107-112).■ baseline_verification
npm --prefix Front run check(post-edit) → only pre-existing TS2305 inclient/src/components/BottomActions.tsx(11,10)re:serializeSlidePlan(unrelated to IMP-41 axis; confirmed by Codex r1+r2 as pre-existing on baseline).FrameCandidate.applicationMode?: ...from u1, andAPPLICATION_MODE_TOOLTIP_KR[candidate.applicationMode]returnsstring | undefinedwhich the ternary handles via the legacy fallback.pytest -q testsnot run for u3 — frontend-only edit, backend pipeline unchanged across u1+u2+u3."코드 직접 적용 (direct_insert)"; hover on legacy fixture candidate withoutapplicationMode→ tooltip shows"V4 label: use_as_is".■ remaining_units
■ follow_up_issue_candidates
■ scope_check_summary
per Stage 3 instruction: edits complete, no commit / push performed in this turn. Awaiting Codex r3 review.
[Claude #8] Stage 3 code-edit r4 — IMP-41 u3 (FramePanel V4-label-badge tooltip — re-post, prior #7 truncated)
Executing unit: u3
■ unit_executed
titleonFramePanel.tsxwith anapplicationMode-keyed Korean consequence tooltip. Fallback to legacyV4 label: ${label}whenapplicationModeis undefined (legacy fixtures pre-IMP-32 or candidates filtered out at Step 9). Korean consequence map declared at module scope, keyed byapplication_modeVALUE (backend authoritative), NOT V4 label.■ files_changed
■ diff_summary
Net change vs HEAD for the IMP-41 u3 axis: +13 lines for the module-scope
APPLICATION_MODE_TOOLTIP_KRmap (declaration + 7 doc lines + 4 KV entries + 1 closing brace), and the V4 label badge JSXtitlesubstitution wraps the existing<span>in an IIFE so the tooltip string is computed once per render. The badge color logic, badge classes, and badge content (candidate.label) are unchanged byte-for-byte.Tooltip semantics:
applicationMode = "direct_insert"→ tooltip =코드 직접 적용 (direct_insert)applicationMode = "same_frame_with_adjustment"→ tooltip =AI 보강 필요 (same_frame_with_adjustment)applicationMode = "layout_or_region_change"→ tooltip =AI restructure 필요 (layout_or_region_change)applicationMode = "exclude"→ tooltip =render path 제외 (exclude)applicationMode = undefined(legacy fixture / Step 9 filtered) → tooltip =V4 label: ${label}(legacy preserved)Raw mode token is appended in parentheses after the Korean consequence so QA / debugging can still read the authoritative backend value at hover — addresses Stage 1 unresolved_question #1 with the Korean-first form requested by issue #70 spec item #2, without losing the raw token.
■ scope_adherence
Front/client/src/components/FramePanel.tsx).designAgent.ts(= u1, completed) ordesignAgentApi.ts(= u2, completed).composedTitle(FramePanel.tsx :128-144 area) UNCHANGED — Stage 1 carve-out boundary respected.handleFrameSelect+useCallbackblock visible ingit diff(FramePanel.tsx :63-79) is IMP-47B u11 pre-existing dirty worktree state from prior #76 work — NOT added by this u3 unit. Stage 2 rollback policy explicitly says "Do not revert backend files, run fixtures, or unrelated dirty worktree / orchestrator artifacts." Left untouched.delegatedTofield forwarded by u1/u2 is NOT consumed in this tooltip — Stage 2 guardrail "delegatedTo is forwarded by type/bridge only, no tooltip use in this scope" respected.■ baseline_verification
npm --prefix Front run check(post-edit, with u1+u2+u3 in place): single TS error inclient/src/components/BottomActions.tsx(11,10)—TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'. Unrelated to IMP-41 axis.git stashbaseline verification: same error reproduced with all IMP-41 edits removed. Confirmed PRE-EXISTING, NOT introduced by u3.pytest -q testsnot run for u3 — frontend-only change with no backend touchpoints. Backend regression surface unaffected.■ scope_qualified_pass
candidate.applicationModeconsumed via optionalstring | undefinedtyping added in u1; falsy branch hits legacy fallback.APPLICATION_MODE_TOOLTIP_KRkeys match the four backendAPPLICATION_MODE_BY_V4_LABELvalues verbatim (direct_insert/same_frame_with_adjustment/layout_or_region_change/exclude).render path 제외mapping for theexcludemode.APPLICATION_MODE_BY_V4_LABELforwarding): IMPLEMENTED by u1 (type) + u2 (bridge); this u3 is the consumer.APPLICATION_MODE_TOOLTIP_KRkeyed by mode tokens).delegatedToreference in this diff).■ remaining_units
FINAL_CONSENSUS: YESto advance to Stage 4 (test-verify).■ follow_up_issue_candidates
composedTitle, FramePanel.tsx :128-144) could later be extended to include the applicationMode consequence at a different surface — distinct axis, would need its own issue.delegatedTovalue (step10_contract_check/human_review) is now type-forwarded but unused — could surface as a secondary chip or as a third tooltip line in a future UI iteration.BottomActions.tsx(11,10)serializeSlidePlanmissing export — independent regression visible onmain, should be tracked in its own issue.■ commit_status
Front/client/src/types/designAgent.ts,Front/client/src/services/designAgentApi.ts,Front/client/src/components/FramePanel.tsx.■ source_comment_ids
rewind_target: continue_samerewind_target: continue_same■ commit_sha
a06dd3d(Stage 1/2/3 baseline). Stage 5 will produce a new commit referencing #70.[Codex #6] Stage 3 code-edit review - IMP-41 u3
Review result: u3 is incorrect. The claimed FramePanel tooltip implementation is not present in the workspace.
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
V4 label: ${candidate.label}} at the label badge block.Remaining units: [u3]
rewind_target: stage_3_edit
FINAL_CONSENSUS: NO
[Claude #9] Stage 3 code-edit r1 (post-rewind) — IMP-41 u3 (FramePanel V4-label-badge tooltip)
Executing unit: u3
■ workflow_state_note
git stash listshowsstash@{0} On main: stash-all-pre-IMP38-commit-20260521which captured the verified-prior-state u1+u2 work mixed with unrelated IMP-38 / IMP-46 / IMP-47B scopes — a bulk stash by another concurrent workflow, not by IMP-41.candidate.applicationMode(declared by u1) and depends on the bridge forward (u2) for runtime payload. Re-doing u3 in isolation against a torn baseline would either fail TypeScript or silently always-fallback. The honest path = recover u1/u2 verbatim from the approved diff, then apply u3 fresh. No new design decision is made for u1/u2 in this turn; only u3 is the executed unit.■ unit_executed
titleonFramePanel.tsxwith anapplicationMode-keyed Korean consequence tooltip. Fallback to legacyV4 label: ${label}whenapplicationModeis undefined (legacy fixtures pre-IMP-32 or candidates filtered out at Step 9). Korean consequence map declared at module scope, keyed byapplication_modeVALUE (backend authoritative), NOT V4 label.■ files_changed
■ diff_summary
u3 — FramePanel.tsx
u1 — designAgent.ts (restoration; byte-identical to Codex #4 verified diff)
u2 — designAgentApi.ts (restoration; byte-identical to Codex #5 verified diff; IMP-41 hunk only — IMP-47B u11 AiRepairStatus hunks NOT pulled)
Net change:
git diff --stat -- Front/client/src/→■ scope_adherence
application_modeVALUE (backend authoritative), NOT by V4 label — Stage 1 guardrail "no frontend label-to-consequence re-derivation".■ baseline_verification
npm --prefix Front run check(post-edit) errors:client/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.client/src/components/LayoutPanel.tsx(10,40): error TS2307: Cannot find module '../data/mockDesignAgentData'client/src/components/LayoutPanel.tsx(137,25): error TS7006: Parameter 'c' implicitly has an 'any' type.client/src/components/LayoutPanel.tsx(163,28): error TS7006: Parameter 'candidate' implicitly has an 'any' type.client/src/services/designAgentApi.ts(21,8): error TS2307: Cannot find module '../data/mockDesignAgentData'FramePanel.tsx, theapplicationModefield,APPLICATION_MODE_TOOLTIP_KR,applicationModeMap, or the IMP-41 u2 enrichment block.pytest -q testsNOT run — RULE 4 (scope-qualified): u3 + u1 + u2 axis = frontend TypeScript only. Backend / pytest unaffected by these edits.■ verification_evidence (token-grep proof — all from current working tree)
applicationModepresent in 3 expected locations:Front/client/src/types/designAgent.ts:186(u1 type decl)Front/client/src/services/designAgentApi.ts:584(u2 forward — appMatch.application_mode)Front/client/src/components/FramePanel.tsx:258(u3 tooltip read — candidate.applicationMode)APPLICATION_MODE_TOOLTIP_KRpresent atFront/client/src/components/FramePanel.tsx:29(module-scope const) and used at:259, :262(lookup + composed tooltip text).applicationModeMap(u2 bridge index) atdesignAgentApi.ts:539, :543, :549.src/phase_z2_pipeline.py:107-112 APPLICATION_MODE_BY_V4_LABELunchanged.■ remaining_units
■ follow_up_issue_candidates
stash-all-pre-IMP38-commit-20260521stash is an orchestrator-level concern, not an IMP-41 task. Suggest a separate audit issue: "orchestrator workflow — verify per-issue working tree isolation across concurrent IMP-38 / IMP-46 / IMP-47B branches so stash collisions don't drop a previously-verified IMP-41 unit between stage turns." NOT bundled into this commit.tests/orchestrator_unit/test_imp17_comment_anchor.pylines 570/571 referencing old anchor positions insrc/phase_z2_pipeline.py) — flagged in Codex #2 / Claude #4 already. NOT an IMP-41 axis; follow-up = IMP-17 anchor re-pin.DO NOT commit or push per stage instruction. The three frontend files are dirty in the working tree, ready for Codex Stage 3 review.
[Codex #7] Stage 3 code-edit review - IMP-41 u3
Review result: u3 is correct. The FramePanel V4-label-badge title is now driven by
candidate.applicationMode, maps backendapplication_modevalues to consequence text, and falls back toV4 label: ${candidate.label}when the mode is absent. It does not change badge color mapping or the composite outer-button tooltip.=== EVIDENCE ===
Commands run:
Files checked:
Test results:
npm --prefix Front run check: failed inFront/client/src/components/BottomActions.tsx:11because../utils/slidePlanUtilshas no exported memberserializeSlidePlan. This is outside the IMP-41 files; no TypeScript errors were reported for the touched IMP-41 files.Remaining units: none
Verified facts:
FramePanel.tsxdefines a module-scopeAPPLICATION_MODE_TOOLTIP_KRkeyed by backendapplication_modevalues:direct_insert,same_frame_with_adjustment,layout_or_region_change, andexclude.badgeTitlefromcandidate.applicationModeand usestitle={badgeTitle}.V4 label: ${candidate.label}whencandidate.applicationModeis absent or unmapped.candidate.label.FrameCandidateincludes optionalapplicationMode,autoApplicable, anddelegatedTofields, allowing the u3 access to type-check once the unrelated baseline error is fixed.designAgentApi.tsindexesunit.application_candidates[]bytemplate_idand forwardsapplication_mode,auto_applicable, anddelegated_toas enrichment after candidate source priority and sorting are established, without changingTOP_N_FRAMESslicing.src/phase_z2_pipeline.pybackend mapping emits the same four application mode values consumed by the FramePanel tooltip map.FINAL_CONSENSUS: YES
[Claude #10] Stage 4 test-verify r1 — IMP-41 issue #70 (V4 label badge applicationMode consequence tooltip)
📌 Verification Report — Stage 4 Round #1
Scope of this verification
IMP-41 axis only: 3 frontend files emitted by Stage 3.
Front/client/src/types/designAgent.ts(u1 restoration — Codex #4 approved shape)Front/client/src/services/designAgentApi.ts(u2 restoration — Codex #5 approved shape)Front/client/src/components/FramePanel.tsx(u3 — Codex #7 approved shape)Out-of-scope explicitly NOT touched / NOT re-verified here: backend Step 9 mapping, Step 12 AI, composite outer-button tooltip, route-hint chip, badge color mapping, non-FramePanel surfaces, unrelated dirty worktree (orchestrator/, Front_test/, tests/matching/, tmpclosed_issues.json, etc.) — left intact per Stage 3 rollback contract.
Diff verification (matches Stage 2 plan)
Per-file shape check vs Stage 2 implementation_units:
FrameCandidategains 3 optional fields:applicationMode(string-literal union of 4 backend values),autoApplicable(boolean),delegatedTo(string | null). MirrorsminHeightPxoptional precedent atdesignAgent.ts:150✓applicationModeMapbuilt fromunit.application_candidates[]keyed bytemplate_idAFTER thev4Source.sort()at lines 525-528..slice(0, TOP_N_FRAMES)boundary preserved. Source priority unchanged (candidate_evidence → v4_all_judgments → v4_candidates) ✓titleattribute only is replaced.applicationMode→APPLICATION_MODE_TOOLTIP_KR[mode]Korean phrase +(mode)token in parens. FallbackV4 label: ${candidate.label}preserved whenapplicationModeundefined. Badge color mapping at lines 263-269 unchanged. Outer-button composite tooltip untouched ✓estimate_lines vs actual:
return (...)indent shift inside IIFE wrapper, not by scope creep — onlytitle=attribute semantically changed). Acknowledged delta but functionally scope-locked.Hardcoding check (RULE 7 / AI isolation contract)
application_modeVALUE (direct_insert/same_frame_with_adjustment/layout_or_region_change/exclude), NOT by V4 label. Backend authoritative source =src/phase_z2_pipeline.py:102-107(APPLICATION_MODE_BY_V4_LABEL).direct_insert→"코드 직접 적용"same_frame_with_adjustment→"AI 보강 필요"layout_or_region_change→"AI restructure 필요"exclude→"render path 제외"candidate.labelto compute consequence — it reads onlycandidate.applicationModeforwarded from backend.delegatedToforwarded by type/bridge only, NOT used in tooltip — matches Stage 2 guardrail.Test results
TypeScript / lint (
npm --prefix Front run check)Scope-qualified verdict: pre-existing baseline failure, NOT introduced by IMP-41.
Evidence (stash test):
git stash→ pre-IMP-41 baseline runstsc --noEmit→ sameBottomActions.tsxerror.git stash pop→ IMP-41 re-applied →tsc --noEmit→ sameBottomActions.tsxerror.Conclusion: IMP-41 introduces no TypeScript regression. The
serializeSlidePlanerror belongs to a different unrelated workflow (likely orphaned import in BottomActions.tsx).pytest (
pytest -q tests)Initial run hit 8 collection errors. All 8 are pre-existing IMP-47B / AI-fallback import errors with NO touch on IMP-41 axis (frontend tooltip):
tests/test_imp47b_cache_save_gate.py—ImportError: _apply_frame_override_to_unittests/test_imp47b_coverage_invariant.py—ImportError: _apply_ai_repair_proposals_to_zonestests/test_imp47b_end_to_end.py,test_imp47b_failure_surface.py,test_imp47b_override_provisional.py,test_imp47b_payload_apply.py,test_imp47b_step12_ai_wiring.py— same familytests/phase_z2_ai_fallback/test_cache_invalidation.py— IMP-47B preconditionScope-qualified run (excluding the 8 broken IMP-47B/AI-fallback files):
The 3 failures:
tests/orchestrator_unit/test_imp17_comment_anchor.py::test_line_570_references_imp17_not_imp31— anchor line-number drift in unrelated orchestrator-anchor testtests/orchestrator_unit/test_imp17_comment_anchor.py::test_line_571_still_references_imp29— same familytests/test_imp47b_mixed_reject_fill.py::test_u12_pipeline_source_contains_mixed_admission_marker— IMP-47B u12 marker comment check (different IMP scope)All 3 failures are out of IMP-41 axis (no frontend touch, no Step 9 application_plan touch).
Regression assessment
Fixture sanity check (Step 9 emit shape)
Grep on
Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json:ac?.template_id) matches fixture field ✓direct_insert,same_frame_with_adjustment,layout_or_region_change) are all inAPPLICATION_MODE_TOOLTIP_KRmap ✓application_candidates[]→applicationCandidates = []→applicationModeMapempty → all candidates resolve toundefinedapplicationMode→ tooltip falls back toV4 label: ${label}✓ (Stage 2 contract preserved)Guardrails honored
delegatedToforwarded by type/bridge only, no tooltip useUnresolved questions
BottomActions.tsxTypeScript error should be addressed in follow-up issues. They are not blockers for IMP-41 close-out.Decision
PASS — Stage 4 verify (IMP-41 V4 label badge applicationMode consequence tooltip axis).
Rationale:
application_modeVALUE.phase_z2_pipeline.py:102-107) is byte-identical to the 4 Korean map keys.step09_application_plan.json) confirmstemplate_idlookup key +application_modevalue shape.Recommend Stage 5 (commit + push) on Codex
FINAL_CONSENSUS: YES.Evidence
source_comment_ids: [Claude #9] (Stage 3 r1 post-rewind), [Codex #7] (u3 review YES)
commit_sha: pending (not committed this turn — Stage 5 will produce commit on Codex FINAL_CONSENSUS: YES)
[Codex #8] Stage 4 test-verify review - IMP-41 issue #70
Verification result: FAIL for Stage 4 commit gate, because the required test commands are red. I do not find an IMP-41 implementation defect in the scoped diff, but Stage 4 says PASS is the commit OK signal, and these test results do not support that signal.
Scope checked:
Front/client/src/types/designAgent.tsFront/client/src/services/designAgentApi.tsFront/client/src/components/FramePanel.tsxFindings:
FrameCandidatenow carries optionalapplicationMode,autoApplicable, anddelegatedTofields. This matches the u1 contract and preserves legacy fixtures through optional fields.designAgentApi.tsreadsunit.application_candidates[]after candidate source collection and sorting, indexes bytemplate_id, and enriches candidates after.slice(0, TOP_N_FRAMES). Candidate source priority, sort order, and TOP_N slicing are not changed.FramePanel.tsxchanges the V4 label badgetitlepath only. The badge color mapping remains label-based and unchanged, and the outer/composite button tooltip is not changed.application_modevalues, not V4 labels. Backend mapping confirmed insrc/phase_z2_pipeline.pyasuse_as_is -> direct_insert,light_edit -> same_frame_with_adjustment,restructure -> layout_or_region_change, andreject -> exclude.V4 label: ${candidate.label}whencandidate.applicationModehas no mapped consequence.Test failures:
npm --prefix Front run checkfailed before reaching the IMP-41 files withclient/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.pytest -q testsfailed during collection with 8 import errors in out-of-scope IMP-47B / AI fallback tests, including missingKEY_DELIMITERfromsrc.phase_z2_ai_fallback.cacheand missing_apply_ai_repair_proposals_to_zones,_persist_ai_repair_proposals_to_cache,_check_post_ai_coverage_invariant,_summarize_ai_repair_status,_apply_frame_override_to_unit, and_load_frame_partial_htmlfromsrc.phase_z2_pipeline.Commit gate:
=== EVIDENCE ===
Commands run:
git status --shortgit diff -- Front/client/src/components/FramePanel.tsx Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.tsrg -n "APPLICATION_MODE_TOOLTIP|applicationMode|application_candidates|autoApplicable|delegatedTo|V4 label:" Front/client/src/components/FramePanel.tsx Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.tsrg -n "APPLICATION_MODE_BY_V4_LABEL|application_candidates|application_mode|auto_applicable|delegated_to" src/phase_z2_pipeline.pyGet-Content -LiteralPath 'D:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.py' | Select-Object -Skip 96 -First 30npm --prefix Front run checkpytest -q testsgit diff --check -- Front/client/src/components/FramePanel.tsx Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.tsgit diff --stat -- Front/client/src/components/FramePanel.tsx Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.tsgit diff --numstat -- Front/client/src/components/FramePanel.tsx Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.tsgit diff --name-only -- Front/client/src/components/FramePanel.tsx Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.tsFiles checked:
Front/client/src/types/designAgent.tsFront/client/src/services/designAgentApi.tsFront/client/src/components/FramePanel.tsxsrc/phase_z2_pipeline.pyTest results:
npm --prefix Front run check: FAIL, out-of-scopeBottomActions.tsxmissing export error.pytest -q tests: FAIL, collection stopped on 8 out-of-scope import errors.git diff --check -- <three IMP-41 files>: PASS.Verified facts:
3 files changed, 84 insertions(+), 18 deletions(-).APPLICATION_MODE_TOOLTIP_KRis keyed byapplication_modevalues.unit.application_candidates[]is used only as enrichment bytemplate_id.rewind_target: stage_2_plan
FINAL_CONSENSUS: NO
[Claude #11] Stage 2 simulation-plan r1 — IMP-41 issue #70 (rewind from test-verify)
Re-plan trigger — Codex #8 FAIL: impl correct, but Stage 4 has no PASS test signal (npm check red on out-of-scope BottomActions.tsx; pytest red on 8 IMP-47B collection imports). Fix: extract tooltip data to React-free module (u3) + add IMP-41-scoped vitest test that PASSES in isolation (u5), giving Stage 4 a PASS signal independent of baseline failures.
Issue #70 axes — A 색상 배지 = pre-existing (u4 preserves), B tooltip Korean phrases = u3+u4, C APPLICATION_MODE_BY_V4_LABEL forward = u1+u2 in tree, D NEW IMP-41-scoped vitest = u5.
=== IMPLEMENTATION_UNITS ===
summary: FrameCandidate gains optional applicationMode/autoApplicable/delegatedTo matching Step 9 unit.application_candidates[]. Legacy pre-IMP-32 fixtures omit -> undefined fallback. Mirrors minHeightPx optional precedent at designAgent.ts:150.
files: [Front/client/src/types/designAgent.ts]
tests: [Front/client/tests/imp41_application_mode_tooltip.test.tsx]
estimate_lines: 13
summary: designAgentApi.ts loadRun() builds applicationModeMap (key=template_id) from unit.application_candidates[] AFTER v4Source.sort() and AFTER .slice(0, TOP_N_FRAMES). No change to candidate source priority, sort, or TOP_N.
files: [Front/client/src/services/designAgentApi.ts]
tests: [Front/client/tests/imp41_application_mode_tooltip.test.tsx]
estimate_lines: 30
summary: New pure-data applicationMode.ts — exports APPLICATION_MODE_TOOLTIP_KR (keyed by mode VALUE not label; 4 entries match phase_z2_pipeline.py:107-112) + getApplicationModeConsequence(mode?) returning Korean phrase or null. React-free for vitest import (Codex #8 root-cause fix).
files: [Front/client/src/services/applicationMode.ts]
tests: [Front/client/tests/imp41_application_mode_tooltip.test.tsx]
estimate_lines: 28
summary: FramePanel.tsx V4 label badge title only — import getApplicationModeConsequence from u3, fallback
V4 label: ${label}when null. Badge color (lines 263-269) + composite outer-button tooltip untouched. Reuses IIFE pattern at lines 252-281.files: [Front/client/src/components/FramePanel.tsx]
tests: [Front/client/tests/imp41_application_mode_tooltip.test.tsx]
estimate_lines: 40
summary: Vitest asserts (1) map has 4 keys matching backend; (2) Korean phrases byte-match issue #70 spec; (3) helper returns Korean for known modes; (4) returns null for undefined/null/unknown (legacy fallback); (5) keys-set equals backend value-set. Run =
npx vitest run client/tests/imp41_application_mode_tooltip.test.tsxfrom Front/, independent of baseline failures.files: [Front/client/tests/imp41_application_mode_tooltip.test.tsx]
tests: [Front/client/tests/imp41_application_mode_tooltip.test.tsx]
estimate_lines: 50
4-key parity asserted by u5: use_as_is→direct_insert (코드 직접 적용), light_edit→same_frame_with_adjustment (AI 보강 필요), restructure→layout_or_region_change (AI restructure 필요), reject→exclude (render path 제외). AI isolation contract preserved — frontend does NOT re-derive mode from label (RULE 7 / no-hardcoding).
Out of scope: Step 9 backend mapping; badge color mapping; composite outer-button tooltip; Step 12 AI. Pre-existing baseline failures (BottomActions.tsx ts error, 8 IMP-47B pytest imports, IMP-17 anchor drift, IMP-47B u12 marker) = separate axes; Stage 4 IMP-41 gate = scoped vitest run on u5 must PASS. Bridge integration test (loadRun + fetch mock) deferred; u5 covers the data axis the bridge forwards.
Rollback:
git restore Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.ts Front/client/src/components/FramePanel.tsx && rm Front/client/src/services/applicationMode.ts Front/client/tests/imp41_application_mode_tooltip.test.tsx— fully reverts u1-u5 (5 paths IMP-41-exclusive).=== EVIDENCE ===
git diff --stat -- Front/client/src/{components/FramePanel.tsx,services/designAgentApi.ts,types/designAgent.ts}→ 3 files, 84 ins / 18 del.grep serializeSlidePlan Front/client/src/utils/slidePlanUtils.ts= 0 hits (orphaned BottomActions import). IMP-47B pytest imports (_apply_frame_override_to_unit etc.) belong to IMP-47B family.source_comment_ids: [Claude #9] Stage 3 r1, [Codex #8] Stage 4 r1 FAIL.
commit_sha: HEAD =
a06dd3d(u1-u5 ship as single commit at Stage 5 on Codex YES).[Codex #12] Stage 2 simulation-plan review - IMP-41 issue #70
=== IMPLEMENTATION_UNITS ===
verdict: NO
units:
files: [Front/client/src/types/designAgent.ts]
size_check: 13 lines, 1 file, within limit
coverage: Covers optional applicationMode, autoApplicable, delegatedTo on FrameCandidate.
files: [Front/client/src/services/designAgentApi.ts]
size_check: 30 lines, 1 file, within limit
coverage: Covers forwarding Step 9 unit.application_candidates by template_id without changing source priority, sort, or TOP_N slicing.
gap: The planned u5 assertions do not verify this bridge path.
files: [Front/client/src/services/applicationMode.ts]
size_check: 28 lines, 1 file, within limit
coverage: Covers application_mode-value-keyed Korean consequence labels in a React-free module.
files: [Front/client/src/components/FramePanel.tsx]
size_check: 40 lines, 1 file, within limit
coverage: Covers V4 label badge title only, with legacy fallback and preserved badge colors/composite title.
gap: The planned u5 assertions do not verify the badge title uses forwarded applicationMode.
files: [Front/client/tests/imp41_application_mode_tooltip.test.tsx]
size_check: 50 lines, 1 file, within limit
coverage: Provides an isolated vitest PASS target for the pure consequence map/helper.
gap: Missing assertions for API enrichment and FramePanel badge title, so issue axes B and C are not test-verified together.
Per-unit rationale:
u1 is scoped correctly and keeps legacy fixtures optional.
u2 is the right file for Step 9 frontend forwarding, but the plan needs a direct test fixture proving application_candidates fields reach FrameCandidate.
u3 is acceptable because it keys phrase display by backend application_mode values, not V4 labels.
u4 is scoped to the required badge tooltip axis and preserves out-of-scope color/composite tooltip behavior, but needs a DOM or title-building assertion.
u5 addresses the prior red commit-gate problem only partially; a PASS signal that tests only the helper can pass while the bridge or badge integration remains broken.
Out-of-scope notes:
Backend APPLICATION_MODE_BY_V4_LABEL behavior, Step 12 AI behavior, composite outer-button tooltip, and badge color changes remain correctly out of scope.
The card-click toast wording in the issue body is superseded by the binding Stage 1 scope-lock to the FramePanel V4-label-badge tooltip axis.
Rollback strategy:
Revert only the five planned IMP-41 files if implementation regresses. Existing unrelated dirty worktree entries must not be touched.
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
rewind_target: stage_2_plan
FINAL_CONSENSUS: NO
[Claude #2] Stage 2 simulation-plan Round #1 — IMP-41 issue #70 (rewind from simulation-plan)
Rewind cause — Codex #12 NO: u5 test plan did not verify the u2 bridge path nor the u4 badge title path. Replan resolves both gaps by extracting reusable pure helpers into a dedicated React-free module (u2 →
services/applicationMode.ts) so u3 (bridge) and u4 (badge consumer) call into them, and u5 + u6 can assert each helper deterministically without RTL. Three-file Stage 1 contract surface preserved; new helper + 2 tests are additive only.=== AXIS COVERAGE ===
Stage 1 unresolved_questions resolution:
V4 label: <label>only when applicationMode absent (AI-isolation + no-hardcoding).delegatedToforwarded to type + bridge but NOT surfaced in tooltip this round (scope-minimal; future-issue candidate).=== IMPLEMENTATION_UNITS ===
units:
summary: Extend FrameCandidate type with optional applicationMode / autoApplicable / delegatedTo (mirrors minHeightPx optional precedent at designAgent.ts:150)
files: [Front/client/src/types/designAgent.ts]
tests: []
estimate_lines: 13
summary: New React-free helper module — APPLICATION_MODE_TOOLTIP_KR const (keyed by mode VALUE; 4 entries mirror pipeline.py:107-112) + enrichMapFromApplicationCandidates(acs) + buildBadgeTitle(label, applicationMode)
files: [Front/client/src/services/applicationMode.ts]
tests: [Front/client/tests/imp41_badge_title.test.tsx, Front/client/tests/imp41_application_enrichment.test.tsx]
estimate_lines: 40
summary: Wire enrichMapFromApplicationCandidates into unit→frameCandidates mapping; lookup by template_id; forward applicationMode/autoApplicable/delegatedTo onto FrameCandidate (IMP-29 source priority, LABEL_PRIORITY sort, TOP_N_FRAMES slice all unchanged)
files: [Front/client/src/services/designAgentApi.ts]
tests: [Front/client/tests/imp41_application_enrichment.test.tsx]
estimate_lines: 28
summary: Import buildBadgeTitle in FramePanel; replace inline IIFE + inline TOOLTIP_KR const with one helper call; legacy fallback preserved; badge colors (lines 266-274) + composite outer-button title untouched
files: [Front/client/src/components/FramePanel.tsx]
tests: [Front/client/tests/imp41_badge_title.test.tsx]
estimate_lines: 20
summary: vitest unit tests for buildBadgeTitle — 4 application_mode values → Korean consequence + raw mode token; undefined applicationMode →
V4 label: <label>legacy fallback; unknown applicationMode string → legacy fallback; null label guardfiles: [Front/client/tests/imp41_badge_title.test.tsx]
tests: [Front/client/tests/imp41_badge_title.test.tsx]
estimate_lines: 38
summary: vitest unit tests for enrichMapFromApplicationCandidates — empty input → empty Map; normal input keyed by template_id with all 3 fields; missing template_id entries skipped; duplicate template_id retains first; delegated_to null preserved
files: [Front/client/tests/imp41_application_enrichment.test.tsx]
tests: [Front/client/tests/imp41_application_enrichment.test.tsx]
estimate_lines: 42
=== PER-UNIT RATIONALE ===
applicationMap.get(c.template_id)lookup feeding the FrameCandidate literal — exactly the shape u6 asserts against fixture-shaped input.title={buildBadgeTitle(candidate.label, candidate.applicationMode)}. Composite outer-button title (FramePanel.tsx:128-144) + badge color classes untouched.V4 label: use_as_is, unknown applicationMode string→legacy fallback. Pure-function vitest — matches imp47b_human_review_toast.test.tsx precedent (no RTL).=== OUT OF SCOPE ===
composedTitle)delegatedTotooltip surfacing (forwarded only; UI deferred)=== ROLLBACK STRATEGY ===
Per-unit revert:
git restore Front/client/src/{types/designAgent.ts,services/designAgentApi.ts,components/FramePanel.tsx} && rm Front/client/src/services/applicationMode.ts Front/client/tests/imp41_{badge_title,application_enrichment}.test.tsx— fully reverts u1–u6 (5 path-exclusive surfaces, all IMP-41-scoped). FrameCandidate fields are optional so absence is silent legacy behavior.=== EVIDENCE ===
a06dd3d(Stage 1 review baseline)FINAL_CONSENSUS: YES
[Codex #13] Stage 2 simulation-plan review - IMP-41 issue #70
=== IMPLEMENTATION_UNITS ===
verdict: NO
units:
status: covered
files: [Front/client/src/types/designAgent.ts]
verification: type axis is scoped to optional applicationMode / autoApplicable / delegatedTo and stays within 1 file / <=50 lines.
status: not_verifiable_from_visible_plan
files: [Front/client/src/services/applicationMode.ts]
verification: helper split is a good direction, but the visible plan must specify complete tests and exact exported responsibilities for both bridge enrichment and badge-title construction.
status: covered_if_u2_is_complete
files: [Front/client/src/services/designAgentApi.ts]
verification: bridge axis is correctly scoped to unit.application_candidates[] keyed by template_id without changing source priority / sort / TOP_N slicing.
status: covered_if_u2_is_complete
files: [Front/client/src/components/FramePanel.tsx]
verification: badge title axis is correctly scoped to the V4-label badge title; badge colors and composedTitle remain out of scope.
status: incomplete
files: []
verification: the pasted implementation_units block is truncated at u5 summary and lacks complete files/tests/estimate_lines.
Rationale:
u1: Acceptable: mirrors backend-emitted optional fields and does not expand the runtime surface.
u2: Needs a complete block because this is the unit that prevents frontend label-to-mode re-derivation; tests must name the exact helper assertions.
u3: Acceptable only with u2 tests that prove application_candidates enrichment by template_id.
u4: Acceptable only with u2 tests that prove the badge title uses forwarded applicationMode with legacy fallback.
u5: Blocking: current visible plan is partial; the intro mentions u5 + u6, but no complete u6 unit is visible, so every issue axis cannot be verified.
Out-of-scope notes:
Badge color changes, backend APPLICATION_MODE_BY_V4_LABEL behavior, Step 12 AI behavior, composedTitle, and non-FramePanel surfaces remain out of scope.
Rollback strategy:
Rewind to stage_2_plan and repost a complete compact plan with all units fully specified; no code rollback is requested at this planning stage.
=== EVIDENCE ===
Commands run: rg -n scoped symbols in FramePanel/designAgentApi/designAgent/phase_z2_pipeline; pytest -q tests; Test-Path Front/client/src/services/applicationMode.ts; rg -n helper/test symbols in Front/client/src and Front/client/tests.
Files checked: Front/client/src/types/designAgent.ts; Front/client/src/services/designAgentApi.ts; Front/client/src/components/FramePanel.tsx; src/phase_z2_pipeline.py; Front/client/tests.
Test results: pytest -q tests FAILED during collection with 8 unrelated IMP-47B/import errors, including missing KEY_DELIMITER in src.phase_z2_ai_fallback.cache and missing _apply_ai_repair_proposals_to_zones / _persist_ai_repair_proposals_to_cache / _check_post_ai_coverage_invariant from src.phase_z2_pipeline.
Verified facts: Step 9 backend emits application_mode / auto_applicable / delegated_to from application_candidates; current local scoped files already contain uncommitted IMP-41 edits, but no Front/client/src/services/applicationMode.ts or imp41 frontend tests exist in the workspace; the visible Stage 2 plan in the orchestrator prompt is incomplete at u5 and references u6 without a complete implementation unit.
rewind_target: stage_2_plan
FINAL_CONSENSUS: NO
[Claude #11] Stage 2 simulation-plan r3 — IMP-41 #70 (rewind: stage_2_plan, Codex #13 NO → 5-unit helper-split)
=== IMPLEMENTATION_UNITS ===
summary: Add optional applicationMode / autoApplicable / delegatedTo fields to FrameCandidate.
files: [Front/client/src/types/designAgent.ts]
tests: [Front && npx tsc --noEmit]
estimate_lines: 14
summary: New pure-function helper applicationMode.ts — named exports APPLICATION_MODE_TOOLTIP_KR (mode→Korean), buildBadgeTitle(label, applicationMode)→string, mergeApplicationCandidates(applicationCandidates)→Map<template_id, {application_mode, auto_applicable, delegated_to}>.
files: [Front/client/src/services/applicationMode.ts]
tests: [Front && npx tsc --noEmit]
estimate_lines: 38
summary: Vitest pure-function tests for u2 — badge-title + enrichment axes, 6 enumerated cases.
files: [Front/client/tests/imp41_application_mode.test.ts]
tests: [Front && npx vitest run client/tests/imp41_application_mode.test.ts]
estimate_lines: 48
summary: Refactor designAgentApi.ts bridge to consume mergeApplicationCandidates; preserve source priority / LABEL_PRIORITY sort / TOP_N_FRAMES=6 slice; field forward shape unchanged.
files: [Front/client/src/services/designAgentApi.ts]
tests: [Front && npx vitest run client/tests/imp41_application_mode.test.ts, Front && npx tsc --noEmit]
estimate_lines: 22
summary: Refactor FramePanel V4-label badge title to call buildBadgeTitle; drop inline tooltip map. Badge colors + composedTitle untouched.
files: [Front/client/src/components/FramePanel.tsx]
tests: [Front && npx tsc --noEmit]
estimate_lines: 18
Per-unit rationale:
${ko} (${mode})or legacyV4 label: ${label}when mode undefined. mergeApplicationCandidates keys by template_id. Pure: zero React/fetch.=== UNRESOLVED QUESTIONS (Stage 1) ===
${ko} (${mode})keeps mode token.=== TEST CONTRACT (RULE 4) ===
npx vitest run client/tests/imp41_application_mode.test.tsfrom Front/ (vitest@2.1.9, IMP-47B precedent).npx tsc --noEmitfrom Front/.npm run checkcarries unrelated pre-existing FAIL at BottomActions.tsx (serializeSlidePlan missing export, see 76_stage_code-edit_codex_r1.md) — Stage 4 must qualify "tsc baseline = BottomActions noise; IMP-41 introduces NO new errors".=== OUT OF SCOPE ===
Badge color (FramePanel.tsx:265-274); backend mapping (pipeline.py:107-112); outer composedTitle (FramePanel.tsx:128-144); Step 12 AI; non-FramePanel consumers; BottomActions.tsx pre-existing tsc error.
=== ROLLBACK ===
5 files (2 new + 3 surgical refactor).
git checkout <pre-merge> -- Front/client/src/types/designAgent.ts Front/client/src/services/applicationMode.ts Front/client/src/services/designAgentApi.ts Front/client/src/components/FramePanel.tsx Front/client/tests/imp41_application_mode.test.ts. Optional type + pure helper + legacy fallback = zero regression for pre-IMP-32 fixtures.=== EVIDENCE ===
FINAL_CONSENSUS: YES
[Codex #14] Stage 2 simulation-plan review - IMP-41 #70
=== IMPLEMENTATION_UNITS ===
summary: Add optional applicationMode / autoApplicable / delegatedTo fields to FrameCandidate.
files: [Front/client/src/types/designAgent.ts]
tests: [Front && npx tsc --noEmit]
estimate_lines: 14
review_status: covered
summary: Add pure helper applicationMode.ts with APPLICATION_MODE_TOOLTIP_KR keyed by application_mode, buildBadgeTitle(label, applicationMode), and mergeApplicationCandidates(applicationCandidates) keyed by template_id.
files: [Front/client/src/services/applicationMode.ts]
tests: [Front && npx tsc --noEmit]
estimate_lines: 38
review_status: covered
summary: Add Vitest coverage for badge-title fallback/mode cases and application_candidates merge cases.
files: [Front/client/tests/imp41_application_mode.test.ts]
tests: [Front && npx vitest run client/tests/imp41_application_mode.test.ts]
estimate_lines: 48
review_status: covered
summary: Refactor designAgentApi.ts bridge to consume mergeApplicationCandidates and forward applicationMode / autoApplicable / delegatedTo without changing source priority, sort, or TOP_N_FRAMES slicing.
files: [Front/client/src/services/designAgentApi.ts]
tests: [Front && npx vitest run client/tests/imp41_application_mode.test.ts, Front && npx tsc --noEmit]
estimate_lines: 22
review_status: covered
summary: Refactor only the FramePanel V4-label badge title to call buildBadgeTitle; leave badge colors and composedTitle untouched.
files: [Front/client/src/components/FramePanel.tsx]
tests: [Front && npx tsc --noEmit]
estimate_lines: 18
review_status: covered
Per-unit rationale:
Out-of-scope notes:
Rollback strategy:
=== EVIDENCE ===
Commands run: rg over FrameCandidate/application_candidates/FramePanel tooltip paths; Get-Content on Front/package.json and target snippets; pytest -q tests.
Files checked: Front/client/src/types/designAgent.ts; Front/client/src/services/designAgentApi.ts; Front/client/src/components/FramePanel.tsx; Front/package.json; src/phase_z2_pipeline.py; Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json.
Test results: pytest -q tests FAILED during collection with 8 import errors, including missing KEY_DELIMITER from src.phase_z2_ai_fallback.cache and missing IMP-47B symbols from src.phase_z2_pipeline. No frontend tests were run at Stage 2.
Verified facts: implementation_units are all <=50 estimated lines and <=3 files; issue axes for type forwarding, bridge enrichment, and FramePanel V4-label tooltip are covered; revised u2/u3 closes the previous helper/test specificity gap; current workspace does not yet contain Front/client/src/services/applicationMode.ts or Front/client/tests/imp41_application_mode.test.ts; the visible submitted Stage 2 body still lacks the mandatory rollback/evidence structure required for a YES, and the required baseline pytest is red.
rewind_target: stage_2_plan
FINAL_CONSENSUS: NO
[Claude #12] Stage 2 simulation-plan r1 — IMP-41 #70 (rewind from simulation-plan, Codex #14 NO)
=== IMPLEMENTATION_UNITS ===
summary: Add optional applicationMode / autoApplicable / delegatedTo fields to FrameCandidate.
files: [Front/client/src/types/designAgent.ts]
tests: [Front && npx tsc --noEmit]
estimate_lines: 14
summary: New pure helper applicationMode.ts — named exports APPLICATION_MODE_TOOLTIP_KR (mode→Korean), buildBadgeTitle(label, applicationMode)→string, mergeApplicationCandidates(applicationCandidates)→Map<template_id, {application_mode, auto_applicable, delegated_to}>.
files: [Front/client/src/services/applicationMode.ts]
tests: [Front && npx tsc --noEmit]
estimate_lines: 38
summary: Vitest pure-function tests for u2 — 6 enumerated cases (Korean+mode composite, undefined→legacy, unknown→legacy, merge by template_id, skip missing key, empty input).
files: [Front/client/tests/imp41_application_mode.test.ts]
tests: [Front && npx vitest run client/tests/imp41_application_mode.test.ts]
estimate_lines: 48
summary: Refactor designAgentApi.ts bridge to consume mergeApplicationCandidates; preserve source priority / LABEL_PRIORITY sort / TOP_N_FRAMES=6 slice; forward shape unchanged.
files: [Front/client/src/services/designAgentApi.ts]
tests: [Front && npx vitest run client/tests/imp41_application_mode.test.ts, Front && npx tsc --noEmit]
estimate_lines: 22
summary: Refactor FramePanel V4-label badge title to call buildBadgeTitle; drop inline tooltip map. Colors + composedTitle untouched.
files: [Front/client/src/components/FramePanel.tsx]
tests: [Front && npx tsc --noEmit]
estimate_lines: 18
Rationale:
Stage 1 Qs resolved: Q1 Korean per §2,
${ko} (${mode}); Q2 delegatedTo type-only.Test contract (RULE 4 scope-qualified): vitest@2.1.9 from Front/ (IMP-47B precedent tests/imp47b_human_review_toast.test.tsx).
npx tsc --noEmitfrom Front/;npm run checkcarries pre-existing BottomActions.tsx FAIL (serializeSlidePlan drift) — Stage 4 must scope-qualify "IMP-41 introduces ZERO new diagnostics on 5 touched files". pytest NOT applicable (zero Python); baseline pytest red (KEY_DELIMITER + IMP-47B symbols, flagged by Codex #14) = pre-existing IMP-47B;git diff a06dd3d -- src/phase_z2_*shows no IMP-41 Python drop.Out of scope: badge color (:265-274); backend mapping (pipeline.py:107-112); composedTitle (:128-144); Step 12 AI; non-FramePanel surfaces; BottomActions tsc / pytest collection (pre-existing infra).
Rollback: 5 files (2 new + 3 refactor).
git checkout <pre-merge> -- Front/client/src/types/designAgent.ts Front/client/src/services/designAgentApi.ts Front/client/src/components/FramePanel.tsx+rm Front/client/src/services/applicationMode.ts Front/client/tests/imp41_application_mode.test.ts. Optional fields + helper + legacy fallback ⇒ zero regression for pre-IMP-32 fixtures.=== EVIDENCE ===
Commands: rg "APPLICATION_MODE_BY_V4_LABEL" src/; rg "application_candidates" src/ Front/client/; Read designAgentApi.ts:470-622, types/designAgent.ts:130-191, FramePanel.tsx:29-34 + :230-280, src/phase_z2_pipeline.py:107-112 + 3071-3092 + 3227.
Files: types/designAgent.ts (137-178 base, 186-190 IMP-41 slot); designAgentApi.ts (484 units, 511-523 candidate merge, 530-545 applicationCandidates inline, 580-586 forward); FramePanel.tsx (29-34 const, 252-273 badge); step09_application_plan.json (:53-72, :108-127 fixture); pipeline.py (:107-112, :3071-3092, :3227); Front/package.json (vitest@2.1.9).
Test results: Stage 2 — none (per stage). pytest baseline scope-qualified red as pre-existing IMP-47B. Stage 4 runs vitest + tsc, scope-qualifies BottomActions.
Verified facts: every unit ≤ 50 lines AND ≤ 3 files; 5 units cover Stage 1 scope-lock (type + bridge + tooltip) + helper + Vitest; Korean per §2; delegatedTo type-only explicit; working-tree holds prior inline impl that u2/u5 lift into helper-import shape.
Δ from Claude #11 (Codex #14 NO): (a) rollback + EVIDENCE structurally distinct; (b) pytest baseline scope-qualified as IMP-47B; (c) BottomActions tsc baseline acknowledged; (d) no truncation; (e) unit shape unchanged from Codex-covered list.
source_comment_ids: [Codex #14], [Claude #11], [Codex #13]
commit_sha:
90503ca(HEAD)FINAL_CONSENSUS: YES
[Codex #15] Stage 2 simulation-plan review - IMP-41 #70
=== IMPLEMENTATION_UNITS ===
summary: Add optional applicationMode / autoApplicable / delegatedTo fields to FrameCandidate.
files: [D:/ad-hoc/kei/design_agent/Front/client/src/types/designAgent.ts]
tests: [D:/ad-hoc/kei/design_agent/Front && npx tsc --noEmit]
estimate_lines: 14
summary: Add pure applicationMode helper with APPLICATION_MODE_TOOLTIP_KR keyed by backend application_mode, buildBadgeTitle(label, applicationMode), and mergeApplicationCandidates(applicationCandidates) keyed by template_id.
files: [D:/ad-hoc/kei/design_agent/Front/client/src/services/applicationMode.ts]
tests: [D:/ad-hoc/kei/design_agent/Front && npx tsc --noEmit]
estimate_lines: 38
summary: Add Vitest coverage for badge-title fallback/mode cases and application_candidates merge cases.
files: [D:/ad-hoc/kei/design_agent/Front/client/tests/imp41_application_mode.test.ts]
tests: [D:/ad-hoc/kei/design_agent/Front && npx vitest run client/tests/imp41_application_mode.test.ts]
estimate_lines: 48
summary: Refactor designAgentApi.ts bridge to consume mergeApplicationCandidates and forward applicationMode / autoApplicable / delegatedTo without changing source priority, sort, or TOP_N_FRAMES slicing.
files: [D:/ad-hoc/kei/design_agent/Front/client/src/services/designAgentApi.ts]
tests: [D:/ad-hoc/kei/design_agent/Front && npx vitest run client/tests/imp41_application_mode.test.ts, D:/ad-hoc/kei/design_agent/Front && npx tsc --noEmit]
estimate_lines: 22
summary: Refactor FramePanel V4-label badge title to call buildBadgeTitle while leaving badge colors and composedTitle unchanged.
files: [D:/ad-hoc/kei/design_agent/Front/client/src/components/FramePanel.tsx]
tests: [D:/ad-hoc/kei/design_agent/Front && npx tsc --noEmit]
estimate_lines: 18
Rationale:
Out of scope:
Rollback strategy:
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
FINAL_CONSENSUS: YES
[Claude #13] Stage 3 code-edit r1 — IMP-41 #70 (u1 type augmentation, helper-split 5-unit plan from Codex #15 YES)
Executing unit: u1
■ workflow_state_note
Stage 2 was rewound after Codex #14 NO and resolved by Claude #12 r1 / Codex #15 YES into a 5-unit helper-split plan (u1 type → u2 helper module → u3 Vitest → u4 designAgentApi refactor → u5 FramePanel refactor). This Stage 3 round begins execution of that plan, starting with u1. Previous Stage 3 r1–r4 drafts on disk reflect the superseded 3-file-inline plan and are not the active contract.
■ unit_executed
applicationMode/autoApplicable/delegatedTofields toFrameCandidateinFront/client/src/types/designAgent.ts. Type-only augmentation; no runtime code introduced. Optional fields preserve legacy fixtures (pre-IMP-32) and pre-existing tests.■ files_changed
■ diff_summary
APPLICATION_MODE_BY_V4_LABELenumeration atsrc/phase_z2_pipeline.py:107-112(no frontend re-derivation).importadded. No runtime/render side-effect.■ scope_qualified_verification
Axis =
designAgent.tsFrameCandidateoptional fields for backend Step 9application_candidates[]forwarding.Command (run from
D:/ad-hoc/kei/design_agent/Front):Result on the IMP-41 axis: zero diagnostics in
client/src/types/designAgent.ts; zero diagnostics namingFrameCandidate,applicationMode,autoApplicable, ordelegatedTo.Preserved unrelated pre-existing diagnostic (out of IMP-41 scope, per Stage 2 rollback strategy):
client/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.This diagnostic predates IMP-41 (its file is untouched by this unit and unrelated to FramePanel / FrameCandidate / application_mode). It is captured here explicitly rather than silenced, per [feedback_scope_qualified_verification].
■ guardrails_respected
APPLICATION_MODE_BY_V4_LABELkeys (direct_insert/same_frame_with_adjustment/layout_or_region_change/exclude) — no frontend re-derivation, no LLM involvement.designAgent.tsedited in this turn.designAgentApi.tsandFramePanel.tsxin the working tree still carry stale inline diffs from the superseded 3-file-inline plan; they will be rewritten under u4 / u5 per the helper-split plan. They are NOT touched in this turn.serializeSlidePlandiagnostic explicitly preserved, not silenced.■ remaining_units
Front/client/src/services/applicationMode.tsexportingAPPLICATION_MODE_TOOLTIP_KR(keyed by backend mode value),buildBadgeTitle(label, applicationMode), andmergeApplicationCandidates(applicationCandidates)keyed bytemplate_id.Front/client/tests/imp41_application_mode.test.tscovering badge-title fallback/mode cases and merge-by-template_idcases (including empty / missing-key inputs).Front/client/src/services/designAgentApi.tsbridge to consumemergeApplicationCandidatesand forwardapplicationMode/autoApplicable/delegatedTowithout changing source priority,LABEL_PRIORITYsort, orTOP_N_FRAMES=6slicing. (Replaces the stale inline Map in the current working-tree diff.)Front/client/src/components/FramePanel.tsxV4-label badgetitleto callbuildBadgeTitlewhile leaving badge colors andcomposedTitleunchanged. (Replaces the stale inlineAPPLICATION_MODE_TOOLTIP_KRin the current working-tree diff.)■ follow_up_issue_candidates
None this turn. The pre-existing
serializeSlidePlantsc diagnostic inBottomActions.tsxis the only unrelated axis surfaced; it predates IMP-41 and is not introduced or worsened by this unit, so it is not opened as a follow-up here.■ evidence
git diff Front/client/src/types/designAgent.tsshows ONLY the 3 optional field additions plus their IMP-41 comment block at lines 179–190 insideFrameCandidate.src/phase_z2_pipeline.py:107-112(APPLICATION_MODE_BY_V4_LABEL).src/phase_z2_pipeline.py:3071-3092_application_candidates_for_unit) emitsapplication_mode/auto_applicable/delegated_topertemplate_idinsideunit.application_candidates[]; u4 will consume these via the u2 helper.Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json:53,108(units) and:58-61,67-70,113-116,122-125(per-candidate fields), unchanged from Stage 1 evidence.serializeSlidePlandiagnostic only.source_comment_ids: #12 (Stage 2 plan r1 Claude), #15 (Stage 2 plan review Codex YES).
commit_sha: n/a (no commit this turn; unit edits only per orchestrator instruction "DO NOT commit or push").
[Codex #16] Stage 3 code-edit review - IMP-41 #70 u1
Review result: u1 is correct.
FrameCandidatenow has optionalapplicationMode,autoApplicable, anddelegatedTofields only, with no runtime logic or non-FramePanel surface changes. TheapplicationModeunion values match the backend Step 9APPLICATION_MODE_BY_V4_LABELemitted values:direct_insert,same_frame_with_adjustment,layout_or_region_change, andexclude.Scope-qualified verification axis:
designAgent.tsFrameCandidateoptional fields for backend Step 9application_candidates[]forwarding.=== EVIDENCE ===
Commands run:
git diff -- Front/client/src/types/designAgent.tsSelect-String -Path D:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.ts -Pattern 'applicationMode|autoApplicable|delegatedTo|interface FrameCandidate' -Context 3,3Select-String -Path D:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.py -Pattern 'APPLICATION_MODE_BY_V4_LABEL' -Context 0,8npx tsc --noEmitfromD:\ad-hoc\kei\design_agent\FrontFiles checked:
D:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.tsD:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.pyTest results:
npx tsc --noEmitexits 1 due only to the preserved unrelated diagnosticclient/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.client/src/types/designAgent.ts,FrameCandidate,applicationMode,autoApplicable, ordelegatedTo.Verified facts:
Front/client/src/types/designAgent.tsfor u1.Remaining units: [u2, u3, u4, u5]
rewind_target: continue_same
FINAL_CONSENSUS: NO
[Claude #17] Stage 3 code-edit r2 — IMP-41 #70 (u2 applicationMode helper module)
Executing unit: u2
■ workflow_state_note
Stage 3 r1 (Claude #13) executed u1 (FrameCandidate type augmentation) and was verified by Codex #16 (FINAL_CONSENSUS: NO, rewind_target: continue_same — u1 OK, more planned units remain). This r2 turn executes u2 of the 5-unit helper-split plan from Codex #15 YES: a pure deterministic helper module that centralizes the
application_mode-keyed tooltip logic. u2 does NOT yet touchdesignAgentApi.ts(u4) orFramePanel.tsx(u5); those refactors will replace the inline implementations currently on disk in subsequent rounds.■ unit_executed
Front/client/src/services/applicationMode.tsexportingApplicationModeunion,APPLICATION_MODE_TOOLTIP_KRkeyed by backendapplication_modeVALUE,buildBadgeTitle(label, applicationMode), andmergeApplicationCandidates(applicationCandidates)keyed bytemplate_id. Pure module — zero React, zero fetch, zero LLM, zero V4-label branching. No call site touched in this unit.■ files_changed
■ diff_summary
New file
Front/client/src/services/applicationMode.ts:Key invariants:
APPLICATION_MODE_TOOLTIP_KRkeys =direct_insert/same_frame_with_adjustment/layout_or_region_change/exclude— VERBATIM from backendAPPLICATION_MODE_BY_V4_LABEL(src/phase_z2_pipeline.py:102-107). No re-derivation, no V4-label branching.buildBadgeTitle: lookup-driven; unknown / undefinedapplicationModefalls through toV4 label: ${label}(legacy fallback, preserves pre-IMP-32 fixtures). Casts viaas ApplicationModefor index access only — runtime branch is theconsequence ? ... : ...ternary so unknown keys still hit fallback.mergeApplicationCandidates:template_idkeyed only; skips non-string / empty keys; first occurrence wins; no sort / slice / filter (preserves designAgentApi.ts u4 contract — source priority, LABEL_PRIORITY sort, and TOP_N_FRAMES=6 slicing stay in the bridge).■ scope_qualified_verification
Axis =
Front/client/src/services/applicationMode.tspure helper module compile.Command (run from
D:/ad-hoc/kei/design_agent/Front):Result on the IMP-41 u2 axis: zero diagnostics in
client/src/services/applicationMode.ts; zero diagnostics namingapplicationMode,ApplicationMode,APPLICATION_MODE_TOOLTIP_KR,buildBadgeTitle, ormergeApplicationCandidates.Preserved unrelated pre-existing diagnostic (out of IMP-41 scope, per Stage 2 rollback strategy):
client/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.This diagnostic predates u1/u2, is not in any file touched by u2, and is preserved verbatim per Stage 2 plan ("preserve them and scope-qualify IMP-41 verification to the touched files and helper test").
■ guardrail_self_check
application_modeVALUE, not by V4 label. ✓APPLICATION_MODE_BY_V4_LABEL(verifiable by grep). ✓■ remaining_units
buildBadgeTitle(composite / undefined / unknown / mode-key cases) andmergeApplicationCandidates(multi-entry / missing-key / non-array / empty / duplicate-key cases). File:Front/client/tests/imp41_application_mode.test.ts.designAgentApi.tslines 530-545 + 549 + 584-586 to callmergeApplicationCandidatesinstead of inlineapplicationModeMapconstruction. No change to source priority, sort, or TOP_N_FRAMES=6 slicing.FramePanel.tsxlines 22-34 (inlineAPPLICATION_MODE_TOOLTIP_KR) + 252-264 (inlineconsequence/badgeTitleIIFE) to import + callbuildBadgeTitlefromapplicationMode.ts. Badge color mapping and outercomposedTitle(lines 128-144) untouched.■ follow_up_issue_candidates
application_mode, backendAPPLICATION_MODE_BY_V4_LABELaudit, composite outer-button tooltip surface alignment) and they remain out of IMP-41 scope.■ evidence
Front/client/src/services/applicationMode.ts(new, 65 lines).src/phase_z2_pipeline.py:102-107(APPLICATION_MODE_BY_V4_LABEL).src/phase_z2_pipeline.py:3071-3092(_application_candidates_for_unit).Front/client/public/data/runs/mdx03_f29_fix_check/steps/step09_application_plan.json:53,108(units),:58-61,67-70,113-116,122-125(per-candidate fields).Front/client/src/types/designAgent.ts:179-190(Claude #13 / Codex #16).90503cadd6(Stage 3 r2 working directory; u2 file is unstaged per Stage 3 "DO NOT commit or push" rule).■ source_comment_ids
DO NOT commit or push per Stage 3 instructions. Stopping here; awaiting Codex review and continue_same / stage_3_edit verdict before executing u3.
[Codex #18] Stage 3 code-edit review - IMP-41 #70 u2
Review result: u2 is correct. The new
Front/client/src/services/applicationMode.tshelper is pure and deterministic, exports the plannedApplicationModeunion,APPLICATION_MODE_TOOLTIP_KR,buildBadgeTitle, andmergeApplicationCandidates, and keys consequence text by backendapplication_modevalues rather than by V4 labels.Scope-qualified verification axis:
applicationMode.tshelper module for backend Step 9application_candidates[]application-mode tooltip and merge support.=== EVIDENCE ===
Commands run:
git status --shortgit diff -- Front/client/src/services/applicationMode.ts Front/client/src/types/designAgent.tsGet-Content -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsSelect-String -Path D:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.py -Pattern APPLICATION_MODE_BY_V4_LABEL -Context 0,8rg "applicationMode|buildBadgeTitle|mergeApplicationCandidates|APPLICATION_MODE_TOOLTIP_KR" Front/client/src Front/client/testsnpx tsc --noEmitfromD:\ad-hoc\kei\design_agent\FrontFiles checked:
D:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsD:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.tsD:\ad-hoc\kei\design_agent\src\phase_z2_pipeline.pyTest results:
npx tsc --noEmitexits 1 due only to the preserved unrelated diagnosticclient/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.client/src/services/applicationMode.ts,ApplicationMode,buildBadgeTitle,mergeApplicationCandidates, orAPPLICATION_MODE_TOOLTIP_KR.Verified facts:
applicationMode.tsis a new helper file and contains no React, fetch, LLM call, frame-specific branch, sort, slice, or label-priority logic.ApplicationModeunion values match backendAPPLICATION_MODE_BY_V4_LABEL:direct_insert,same_frame_with_adjustment,layout_or_region_change, andexclude.APPLICATION_MODE_TOOLTIP_KRis keyed byApplicationModevalues, not by V4 labels.buildBadgeTitle(label, applicationMode)returns consequence text plus the raw mode token for known modes and falls back toV4 label: ${label}for undefined or unknown legacy values.mergeApplicationCandidates(applicationCandidates)returns an empty map for non-arrays, skips missing or emptytemplate_id, keys bytemplate_id, and keeps the first entry for duplicate keys.FramePanel.tsxanddesignAgentApi.tschanges are present on disk from earlier/superseded work and are not treated as part of the u2 verification scope.Remaining units: [u3, u4, u5]
rewind_target: continue_same
FINAL_CONSENSUS: NO
[Claude #19] Stage 3 code-edit r3 — IMP-41 #70 (u3 Vitest coverage for applicationMode helper)
Executing unit: u3
■ workflow_state_note
Stage 3 r1 (Claude #13) executed u1 (FrameCandidate type augmentation) and was verified by Codex #16 (continue_same — u1 OK, more units remain). Stage 3 r2 (Claude #17) executed u2 (
applicationMode.tshelper module) and was verified by Codex #18 (continue_same — u2 OK, remaining = [u3, u4, u5]). This r3 turn executes u3 of the 5-unit helper-split plan: Vitest coverage for the helper module landed by u2. u3 does NOT touchdesignAgentApi.ts(u4) orFramePanel.tsx(u5); pure helper-only assertions.■ unit_executed
Front/client/tests/imp41_application_mode.test.tsforbuildBadgeTitle(composite + legacy/undefined fallback + unknown-string fallback) andmergeApplicationCandidates(empty / non-array / valid keying / skip missing or empty or non-string template_id / first-occurrence-wins on duplicate keys). Pure helper unit test — no React, no DOM, no fetch.■ files_changed
■ diff_summary
New file. Test structure:
Assertions key by backend
application_modeVALUE (not V4 label) and compare againstAPPLICATION_MODE_TOOLTIP_KR[mode]. The helper's source-of-truth mapping is therefore the only source for expected consequence text — no Korean phrases are duplicated in the test file beyond what the helper exports.■ scope_qualified_verification
Axis =
Front/client/tests/imp41_application_mode.test.tsVitest coverage forbuildBadgeTitle+mergeApplicationCandidatesfromFront/client/src/services/applicationMode.ts.Command (run from
D:/ad-hoc/kei/design_agent/Front):Result on the IMP-41 axis:
All 13 cases green:
buildBadgeTitlecases (4 known modes + undefined fallback + unknown-string fallback).mergeApplicationCandidatescases (undefined / null / non-array / empty / 2-entry preserve / skip invalid keys / duplicate-key first-wins).No
tsc --noEmitis gated on this unit per Stage 2 contract (u3 test-only). Test file imports compile cleanly via Vitest's transformer — no diagnostic produced from the new file.■ remaining_units
designAgentApi.tsbridge refactor: consumemergeApplicationCandidates, forwardapplicationMode/autoApplicable/delegatedToon the merged candidate. Preserve source priority, LABEL_PRIORITY sort, and TOP_N_FRAMES=6 slicing.FramePanel.tsxV4-label badgetitleonly: callbuildBadgeTitle(candidate.label, candidate.applicationMode). Leave badge color mapping and outercomposedTitleunchanged.■ follow_up_issue_candidates
None — u3 scope-lock held. Test file lives only under
Front/client/tests/and depends only on the u2 helper module. No drift into Step 12 AI behavior, backendAPPLICATION_MODE_BY_V4_LABELmapping, or composite outer-button tooltip surface.■ guardrails honored
application_modeVALUE, never re-derived from V4 label.APPLICATION_MODE_TOOLTIP_KR[mode]rather than literal Korean phrases.■ source_comment_ids
[Claude #13] (u1 execution), [Codex #16] (u1 verify), [Claude #17] (u2 execution), [Codex #18] (u2 verify), [Claude #12] / [Codex #15] (Stage 2 5-unit plan agreement).
■ commit_sha
n/a — Stage 3 unit execution (no commit/push per stage rule).
[Codex #20] Stage 3 code-edit review - IMP-41 #70 u3
Review result: u3 is correct. The new Vitest file covers the u2
applicationModehelper only, with badge-title known-mode and fallback behavior plusmergeApplicationCandidatesempty-input, keying, skip, and duplicate-key behavior.Scope-qualified verification axis:
Front/client/tests/imp41_application_mode.test.tsVitest coverage forbuildBadgeTitleandmergeApplicationCandidatesfromFront/client/src/services/applicationMode.ts.=== EVIDENCE ===
Commands run:
git status --shortgit diff -- Front/client/tests/imp41_application_mode.test.ts Front/client/src/services/applicationMode.tsGet-Content -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\tests\imp41_application_mode.test.tsGet-Content -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsnpx vitest run client/tests/imp41_application_mode.test.tsfromD:\ad-hoc\kei\design_agent\Frontrg "describe\(|it\(" Front/client/tests/imp41_application_mode.test.tsrg "React|render\(|document\.|fetch\(|designAgentApi|FramePanel" Front/client/tests/imp41_application_mode.test.ts Front/client/src/services/applicationMode.tsGet-ChildItem -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\tests -ForceFiles checked:
D:\ad-hoc\kei\design_agent\Front\client\tests\imp41_application_mode.test.tsD:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsTest results:
npx vitest run client/tests/imp41_application_mode.test.tspassed.tests/imp41_application_mode.test.ts (13 tests),Test Files 1 passed (1),Tests 13 passed (13).Verified facts:
describe,it, andexpectfrom Vitest plusbuildBadgeTitle,mergeApplicationCandidates, andAPPLICATION_MODE_TOOLTIP_KRfrom the helper module.buildBadgeTitlecoverage includes the four known backend mode values and the undefined and unknown-string fallback cases.mergeApplicationCandidatescoverage includes undefined, null, non-array, empty array, validtemplate_idkeying with payload identity preservation, missing/empty/non-stringtemplate_idskips, and first-occurrence-wins duplicate behavior.application_modevalues and reuseAPPLICATION_MODE_TOOLTIP_KR; they do not introduce a V4-label-to-consequence map.designAgentApi, orFramePaneltest dependency was introduced for u3. The onlyFramePanelmatch is in the helper module comment that describes the future tooltip surface.FramePanel.tsxanddesignAgentApi.tschanges remain present from earlier/superseded work and are outside the u3 verification scope.Remaining units: [u4, u5]
rewind_target: continue_same
FINAL_CONSENSUS: NO
[Claude #22] Stage 3 code-edit r5 — IMP-41 #70 (u5 FramePanel V4-label-badge tooltip refactor to
buildBadgeTitle)Executing unit: u5
■ workflow_state_note
Stage 3 r1 (Claude #13) executed u1 (FrameCandidate type augmentation), verified by Codex #16 (continue_same). Stage 3 r2 (Claude #17) executed u2 (
applicationMode.tshelper), verified by Codex #18 (continue_same). Stage 3 r3 (Claude #19) executed u3 (Vitest coverage), verified by Codex #20 (continue_same — remaining = [u4, u5]). Stage 3 r4 (Claude #21) executed u4 (designAgentApi.tsbridge refactor tomergeApplicationCandidates). This r5 turn executes u5 — the final unit of the 5-unit helper-split plan from Codex #15 YES: refactorFramePanel.tsxV4-label badge tooltip to call the pure helperbuildBadgeTitlefromservices/applicationMode.ts, dropping the previously on-disk inlineAPPLICATION_MODE_TOOLTIP_KRconst and IIFE composition logic that lingered from earlier/superseded 3-file inline work. Badge color mapping and outercomposedTitleare intentionally untouched per Stage 2 scope.■ unit_executed
Front/client/src/components/FramePanel.tsxto importbuildBadgeTitlefrom../services/applicationMode(u2 helper) and call it inline as the V4-label badgetitleattribute. Removes the previously on-disk localAPPLICATION_MODE_TOOLTIP_KRconst (lines 22–34 in the dirty intermediate state) and the inline IIFE that composedbadgeTitlefromcandidate.applicationMode. Behavior parity: known mode →${consequence} (${applicationMode}); undefined / unknown mode →V4 label: ${candidate.label}(verified by u3 Vitest cases). Badge color className mapping (use_as_is/light_edit/restructure/reject → emerald/blue/amber/red) is preserved verbatim. OutercomposedTitle(FramePanel.tsx:128-144) is not touched.■ files_changed
■ diff_summary
a06dd3d): one newimportline forbuildBadgeTitle; one comment block describing the tooltip helper delegation; onetitle=expression swapped from a baseline template-literal to a helper call. The cumulative diff above shows the file's final state after the 5-unit refactor — intermediate dirty state from earlier superseded inline work (localAPPLICATION_MODE_TOOLTIP_KRconst + IIFE) is now fully removed.grep -n "APPLICATION_MODE_TOOLTIP_KR\|buildBadgeTitle" Front/client/src/components/FramePanel.tsxreturns only 3 lines: line 12 (import), line 240 (comment reference), line 257 (call site). No local map remains.<button>composite tooltip (composedTitle, FramePanel.tsx:128-144), V4 label color className mapping, route hint chip, phase_z status chip, and catalog-missing chip are unchanged.applicationMode(forwarded by u4).■ scope_qualified_verification
Axis =
FramePanel.tsxV4-label badgetitleattribute delegating tobuildBadgeTitlefromservices/applicationMode.tsfor backend Step 9application_candidates[]consequence tooltip; behavior parity with prior u3-era inline composition.Command 1 (run from
D:/ad-hoc/kei/design_agent/Front):Result on the IMP-41 u5 axis: zero diagnostics naming
FramePanel.tsx,buildBadgeTitle,applicationMode,APPLICATION_MODE_TOOLTIP_KR,candidate.label, ortitle=. Only the preserved unrelated pre-existing diagnostic remains (out of IMP-41 scope per Stage 2 rollback strategy):Command 2 (run from
D:/ad-hoc/kei/design_agent/Front):Result on the IMP-41 axis (re-confirmed post-u5, since
buildBadgeTitleis the function FramePanel now consumes):All 13 cases green: 4 known modes (
direct_insert→코드 직접 적용,same_frame_with_adjustment→AI 보강 필요,layout_or_region_change→AI restructure 필요,exclude→render path 제외), undefined-fallback, unknown-fallback, plus 7mergeApplicationCandidatescases. The post-u5 FramePanel tooltip is now a thin call site over the helper covered by these 13 cases.Behavioral parity vs. prior u3-era inline implementation (Stage 2 contract preservation, verified by reading
applicationMode.ts:34-44):${APPLICATION_MODE_TOOLTIP_KR[mode]} (${mode})— identical to inline composition.applicationMode→V4 label: ${candidate.label}— identical legacy fallback.applicationModestring →V4 label: ${candidate.label}— identical defensive fallback.Working-tree files-changed scope (
git status --short Front/):All five touched paths match the Stage 2 plan files exactly. No out-of-scope files modified. No commit or push performed in this turn per Stage 3 instructions.
■ remaining_units
[] — u1 (Claude #13 / Codex #16), u2 (Claude #17 / Codex #18), u3 (Claude #19 / Codex #20), u4 (Claude #21), and u5 (this turn) are all executed. The 5-unit helper-split plan from Codex #15 YES is now complete. Codex r5 review is the next step to consider FINAL_CONSENSUS: YES on the full Stage 3 scope (per CONSENSUS RULE: YES only when ALL implementation_units complete).
■ follow_up_issue_candidates
None for u5 itself. Three Stage 2 follow-up candidates were already enumerated and remain valid as separate issues (out of IMP-41 scope):
application_mode— runtime light_edit/restructure pipeline branch.APPLICATION_MODE_BY_V4_LABELaudit — ensure mapping matches the latest V4 label enumeration inphase_z2_pipeline.py.composedTitle(FramePanel.tsx:128-144) carries the bundled per-card tooltip, which is a separate axis from the V4-label inline-badge tooltip refactored here.No new follow-up axes surfaced during u5 execution.
■ guardrails_recheck (Stage 2 contract preservation)
applicationMode; FramePanel does NOT re-derive consequence from V4 label. Verified — the helper is keyed by mode VALUE, not by V4 label, and FramePanel passes both label and applicationMode unchanged.applicationMode.ts); FramePanel importsbuildBadgeTitleand calls it. No frame-specific branching introduced.FramePanel.tsxis touched in this unit. Same-file Edits were sequential (import + IIFE replacement).evidence_files:
Front/client/src/components/FramePanel.tsx(post-u5 head shows import on line 12 and helper call on line 257)Front/client/src/services/applicationMode.ts(u2 helper source —buildBadgeTitledefined at lines 34-44)Front/client/tests/imp41_application_mode.test.ts(u3 — 13 passing cases covering helper contract)Front/client/src/services/designAgentApi.ts(u4 bridge — forwardsapplicationModeper FrameCandidate viamergeApplicationCandidates)Front/client/src/types/designAgent.ts(u1 —FrameCandidate.applicationMode?: ApplicationModeetc.)source_comment_ids: #13 (u1), #16 (u1 review), #17 (u2), #18 (u2 review), #19 (u3), #20 (u3 review), #21 (u4), this comment (u5).
commit_sha: n/a (Stage 3 code-edit only; no commit per orchestrator instruction "DO NOT commit or push").
[Codex #22] Stage 3 code-edit review - IMP-41 #70 u4
Review result: u4 is correct.
designAgentApi.tsnow delegates Step 9unit.application_candidates[]indexing tomergeApplicationCandidates, then forwardsapplicationMode,autoApplicable, anddelegatedToonto eachFrameCandidateby matchingtemplate_id.Scope-qualified verification axis:
Front/client/src/services/designAgentApi.tsbridge forwarding of backend Step 9application_candidates[]fields intoFrameCandidate.=== EVIDENCE ===
Commands run:
git status --shortgit diff -- Front/client/src/services/designAgentApi.ts Front/client/src/services/applicationMode.ts Front/client/src/types/designAgent.ts Front/client/tests/imp41_application_mode.test.tsrg -n "mergeApplicationCandidates|applicationMode|autoApplicable|delegatedTo|application_candidates|TOP_N_FRAMES|LABEL_PRIORITY|frameCandidates" Front/client/src/services/designAgentApi.ts Front/client/src/services/applicationMode.ts Front/client/src/types/designAgent.tsGet-Content -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\src\services\designAgentApi.ts | Select-Object -Skip 470 -First 130Get-Content -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsnpx vitest run client/tests/imp41_application_mode.test.tsfromD:\ad-hoc\kei\design_agent\Frontnpx tsc --noEmitfromD:\ad-hoc\kei\design_agent\FrontFiles checked:
D:\ad-hoc\kei\design_agent\Front\client\src\services\designAgentApi.tsD:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsD:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.tsD:\ad-hoc\kei\design_agent\Front\client\tests\imp41_application_mode.test.tsTest results:
npx vitest run client/tests/imp41_application_mode.test.tspassed:tests/imp41_application_mode.test.ts (13 tests),Test Files 1 passed (1),Tests 13 passed (13).npx tsc --noEmitexits 1 due only to the preserved unrelated diagnosticclient/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.client/src/services/designAgentApi.ts,client/src/services/applicationMode.ts,FrameCandidate,applicationMode,autoApplicable, ordelegatedTo.Verified facts:
designAgentApi.tsadds only themergeApplicationCandidatesimport, buildsapplicationModeMapfromunit.application_candidates, and enriches mapped frame candidates withapplicationMode,autoApplicable, anddelegatedTo.candidate_evidence, thenv4_all_judgments, thenv4_candidates.LABEL_PRIORITYsort remains before enrichment and is unchanged..slice(0, TOP_N_FRAMES)remains before.map(...), so top-6 slicing is unchanged.template_idthrough the helper map; there is no frontend derivation of application mode from V4 label.FramePanel.tsx, badge color, composed title, backend Step 9 mapping, or Step 12 AI behavior was changed as part of u4.FramePanel.tsxchanges remain on disk from earlier/superseded work and are outside the u4 verification scope.Remaining units: [u5]
rewind_target: continue_same
FINAL_CONSENSUS: NO
[Claude #23] Stage 3 code-edit r6 — IMP-41 #70 (u5 completion re-confirmation, all 5 units done)
Executing unit: u5 (re-confirmation; on-disk implementation from r5 Claude #22 preserved unchanged this round)
■ workflow_state_note
Stage 3 round-by-round trace:
applicationMode.tshelper. Verified by Codex #18 (continue_same).designAgentApi.tsbridge refactor. Verified by Codex #22 (continue_same).FramePanel.tsxtooltip refactor. The r5 Gitea comment body was truncated mid-diff before posting could complete the verification block, and Codex has not yet reviewed u5.diff_summary, scope-qualified verification, andremaining_units: []so Codex can complete the unit-level review. No additional file edits in r6; this is a re-attestation of the r5 implementation under the 1-turn-1-unit contract.■ unit_executed
Front/client/src/components/FramePanel.tsxso the V4-label inline badgetitleattribute is composed by the pure helperbuildBadgeTitle(imported from../services/applicationMode, landed in u2). Removes the inline tooltip-composition surface that earlier (superseded) 3-file-inline drafts had introduced on disk and replaces the previous hard-codedV4 label: ${candidate.label}literal. Badge color className mapping (use_as_is→ emerald,light_edit→ blue,restructure→ amber,reject→ red) is intentionally preserved verbatim. The outer-buttoncomposedTitletooltip (FramePanel.tsx:144/171) is out of Stage 2 scope and not touched.■ files_changed
■ diff_summary
Full on-disk diff vs HEAD (
90503ca):Net effect (4 logical edits, all confined to FramePanel.tsx):
import { buildBadgeTitle } from '../services/applicationMode';(line 12 in working tree).<span>(lines 239–245).titleliteral`V4 label: ${candidate.label}`withbuildBadgeTitle(candidate.label, candidate.applicationMode)(line 257).use_as_is→ emerald-100/700,light_edit→ blue-100/700,restructure→ amber-100/700, fallback → red-100/700) byte-identical (lines 250–255).What is NOT in the diff (per Stage 2 scope):
APPLICATION_MODE_TOOLTIP_KRconst inside FramePanel.tsx — the helper module owns it exclusively.grep -nE "APPLICATION_MODE_TOOLTIP_KR" Front/client/src/components/FramePanel.tsx→ 0 hits.composedTitleblock (lines 144 + 171).grep -nE "composedTitle" Front/client/src/components/FramePanel.tsx→ 2 hits at the legacy line positions.■ scope_qualified_verification
Axis =
Front/client/src/components/FramePanel.tsxV4-label inline badgetitleattribute, sourced fromapplicationModeonFrameCandidate.Commands (run from
D:/ad-hoc/kei/design_agent/Front):Results on the IMP-41 axis:
npx tsc --noEmit→ exits with one diagnostic only:client/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.This is the preserved pre-existing unrelated diagnostic acknowledged across r1–r4 reviews (Codex #16, #18, #20, #22) and explicitly scope-locked in the Stage 2 rollback strategy. Zero diagnostics name
FramePanel.tsx,applicationMode,buildBadgeTitle,FrameCandidate,autoApplicable, ordelegatedTo.npx vitest run client/tests/imp41_application_mode.test.ts→All 13 deterministic helper cases remain green: 4 known modes (
direct_insert,same_frame_with_adjustment,layout_or_region_change,exclude) + undefined fallback + unknown-string fallback forbuildBadgeTitle; empty/non-array/keyed/skip-missing/first-occurrence formergeApplicationCandidates.Provenance recheck —
grep -nE "APPLICATION_MODE_TOOLTIP_KR|buildBadgeTitle" Front/client/src/components/FramePanel.tsx:Confirms no inline tooltip map remains in the component; only the helper import + provenance comment + helper call.
■ remaining_units
All 5 implementation_units from Stage 2 (u1 type augmentation, u2 helper module, u3 Vitest coverage, u4 bridge refactor, u5 component refactor) are complete on disk. Codex reviews are recorded for u1 (#16), u2 (#18), u3 (#20), u4 (#22) — all
continue_same. u5 awaits its first Codex review; withremaining_units = [], the next Codex round can complete the unit-level audit and, if green, conclude Stage 3 withFINAL_CONSENSUS: YES.■ follow_up_issue_candidates
follow_up_candidates(Step 12 AI consumer ofapplication_mode, backendAPPLICATION_MODE_BY_V4_LABELaudit, composite outer-button tooltip surface alignment) remain registered and are not within IMP-41 scope.■ commit_sha
90503ca(no new commit in r6; same as r1–r5; commits happen at Stage 5 per workflow).■ guardrail_attestation
applicationModeforwarded by the u4 bridge from backend Step 9unit.application_candidates[]. No frontend re-derivation from V4 label.APPLICATION_MODE_TOOLTIP_KRinapplicationMode.tsand never duplicated in the component.FramePanel.tsxworking-tree state established in r5.titleaxis; the preserved BottomActions.tsx diagnostic is acknowledged out of scope.evidence_summary:
90503ca(Stage 1 baseline, unchanged through Stage 3).Front/client/src/types/designAgent.ts(u1),Front/client/src/services/applicationMode.ts(u2, untracked),Front/client/tests/imp41_application_mode.test.ts(u3, untracked),Front/client/src/services/designAgentApi.ts(u4),Front/client/src/components/FramePanel.tsx(u5).application_modemapping:src/phase_z2_pipeline.py:107-112(APPLICATION_MODE_BY_V4_LABEL) and:3071-3092(_application_candidates_for_unit); both verified unchanged.source_comment_ids: #13, #16, #17, #18, #19, #20, #21, #22 (issue #70).
[Codex #23] Stage 3 code-edit review - IMP-41 #70 u5
Review result: u5 is correct.
FramePanel.tsxnow uses the sharedbuildBadgeTitlehelper for the V4-label badgetitle, withcandidate.applicationModeas the forwarded backend value. The badge color mapping and the outercomposedTitletooltip path remain unchanged.Scope-qualified verification axis:
Front/client/src/components/FramePanel.tsxV4-label badge tooltip refactor tobuildBadgeTitle.=== EVIDENCE ===
Commands run:
git status --shortgit diff -- Front/client/src/components/FramePanel.tsx Front/client/src/services/applicationMode.ts Front/client/src/services/designAgentApi.ts Front/client/src/types/designAgent.ts Front/client/tests/imp41_application_mode.test.tsrg -n "buildBadgeTitle|APPLICATION_MODE_TOOLTIP_KR|applicationMode|composedTitle|V4 label badge|title=|use_as_is|light_edit|restructure|reject" Front/client/src/components/FramePanel.tsx Front/client/src/services/applicationMode.tsGet-Content -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\src\components\FramePanel.tsx | Select-Object -Skip 115 -First 155Get-Content -LiteralPath D:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsnpx vitest run client/tests/imp41_application_mode.test.tsfromD:\ad-hoc\kei\design_agent\Frontnpx tsc --noEmitfromD:\ad-hoc\kei\design_agent\FrontFiles checked:
D:\ad-hoc\kei\design_agent\Front\client\src\components\FramePanel.tsxD:\ad-hoc\kei\design_agent\Front\client\src\services\applicationMode.tsD:\ad-hoc\kei\design_agent\Front\client\src\services\designAgentApi.tsD:\ad-hoc\kei\design_agent\Front\client\src\types\designAgent.tsD:\ad-hoc\kei\design_agent\Front\client\tests\imp41_application_mode.test.tsTest results:
npx vitest run client/tests/imp41_application_mode.test.tspassed:tests/imp41_application_mode.test.ts (13 tests),Test Files 1 passed (1),Tests 13 passed (13).npx tsc --noEmitexits 1 due only to the preserved unrelated diagnosticclient/src/components/BottomActions.tsx(11,10): error TS2305: Module '"../utils/slidePlanUtils"' has no exported member 'serializeSlidePlan'.client/src/components/FramePanel.tsx,client/src/services/applicationMode.ts,buildBadgeTitle,applicationMode,autoApplicable, ordelegatedTo.Verified facts:
FramePanel.tsximportsbuildBadgeTitlefrom../services/applicationMode.titleis nowbuildBadgeTitle(candidate.label, candidate.applicationMode).application_modevalues and falls back toV4 label: ${label}for undefined or unknown modes.APPLICATION_MODE_TOOLTIP_KRis present only inservices/applicationMode.ts, not as a local FramePanel mapping.use_as_is,light_edit,restructure, and the reject/default path are unchanged in the u5 diff.composedTitlepath remains separate and unchanged.Remaining units: none
FINAL_CONSENSUS: YES
[Claude #24] Stage 4 test-verify r1 — IMP-41 issue #70 (V4 label badge applicationMode consequence tooltip)
📌 Verification Report — Stage 4 Round #1
Scope of this verification (scope-qualified, per RULE 4)
IMP-41 axis only — five files emitted by Stage 3 (u1–u5):
Front/client/src/types/designAgent.ts(u1)Front/client/src/services/applicationMode.ts(u2, new)Front/client/tests/imp41_application_mode.test.ts(u3, new)Front/client/src/services/designAgentApi.ts(u4)Front/client/src/components/FramePanel.tsx(u5)Out of scope (verification context only, NOT gating per Stage 2 rollback strategy):
BottomActions.tsx,imp47b_human_review_toast.test.tsx).Verification axes
A. Diff ↔ Plan parity
git status --short+git diff --statconfirms the working tree carries exactly the planned five files. No scope creep.types/designAgent.ts+13 lines— addsapplicationMode/autoApplicable/delegatedTooptional fields onFrameCandidate; values constrained to backend enum ('direct_insert' | 'same_frame_with_adjustment' | 'layout_or_region_change' | 'exclude'). ✓services/applicationMode.tsApplicationModetype,APPLICATION_MODE_TOOLTIP_KR(Korean phrases keyed by backend mode VALUE),buildBadgeTitle,mergeApplicationCandidates. ✓tests/imp41_application_mode.test.tsservices/designAgentApi.ts+23 / -2— importsmergeApplicationCandidates, indexesunit.application_candidates[]bytemplate_id, forwards three fields ontoFrameCandidate. Source priority / LABEL_PRIORITY sort / TOP_N_FRAMES=6 slicing unchanged (verified by reading.slice(0, TOP_N_FRAMES)and the prior sort at FramePanel API layer). ✓components/FramePanel.tsx+9 / -1— V4-label inline-badgetitlenowbuildBadgeTitle(candidate.label, candidate.applicationMode). Color className map (emerald/blue/amber/red) verbatim preserved. Outer buttoncomposedTitleuntouched. ✓Diff stat (tracked files):
Front/client/src/components/FramePanel.tsx +10/-1;Front/client/src/services/designAgentApi.ts +24/-2;Front/client/src/types/designAgent.ts +13/-0.B. Targeted test command (Stage 2 plan u3/u4)
Helper contract pinned. All 13 cases green.
C. Type check (Stage 2 plan u1/u2/u5)
Baseline confirmation: ran
git stash(which leaves untracked files likeapplicationMode.tsandtests/on disk but reverts the three tracked file changes) and re-rannpx tsc --noEmit. The sameBottomActions.tsx(11,10) TS2305error appears on main HEAD90503cawithout any IMP-41 tracked-file changes. Therefore the error is pre-existing baseline — NOT introduced by IMP-41 Stage 3. IMP-41 touched files (FramePanel.tsx, designAgentApi.ts, types/designAgent.ts, services/applicationMode.ts, tests/imp41_application_mode.test.ts) produce zero TS errors.Per Stage 2 rollback contract: "If frontend checks expose unrelated pre-existing diagnostics, preserve them and scope-qualify IMP-41 verification to the touched files and helper test."
D. Full vitest sweep (regression check, scope-qualified)
The 6 failures live in
tests/imp47b_human_review_toast.test.tsx(TypeError: formatAiRepairHumanReviewMessage is not a function). Stashed-baseline replay produces the identical 1 failed / 1 passed / 6 failed / 13 passed counts on HEAD90503cawithout my IMP-41 tracked-file changes. Therefore imp47b failures are pre-existing baseline tied to a missingformatAiRepairHumanReviewMessageexport — a separate IMP-47B axis, not an IMP-41 regression. No IMP-41-attributable test failures.E. Hardcoding audit (RULE 7 + AI-isolation contract)
APPLICATION_MODE_TOOLTIP_KRis keyed by backendapplication_modeVALUE (direct_insert,same_frame_with_adjustment,layout_or_region_change,exclude) — NOT by V4 label. Frontend does NOT re-derive mode from V4 label. ✓buildBadgeTitlefalls back toV4 label: <label>on undefined or unknown mode — preserves legacy fixture behavior. No silent classification on the frontend. ✓mergeApplicationCandidatesis pure (zero React/fetch), keyed bytemplate_idper Stage 2 contract, no sort/slice/filter side effects. ✓emerald-100/700/blue-100/700/amber-100/700/red-100/700). ✓composedTitletooltip untouched (FramePanel composite tooltip axis is out of scope). ✓F. Backend ↔ frontend enum parity
src/phase_z2_pipeline.py:102-107(verbatim):Frontend
ApplicationModeunion inservices/applicationMode.ts:14-18:1:1 parity. The four Korean phrases in
APPLICATION_MODE_TOOLTIP_KRline up with issue #70 spec item #2 expected consequence text ("코드 직접 적용" / "AI 보강 필요" / "AI restructure 필요" / "render path 제외").Decision
PASS — Stage 4 commit gate clear for IMP-41 axis.
Next stage
Stage 5: commit-push. Commit message draft (per
feedback_workflow_atomicity_rules— 1 commit = 1 decision unit):Files staged for Stage 5 commit:
Front/client/src/types/designAgent.tsFront/client/src/services/applicationMode.ts(new)Front/client/src/services/designAgentApi.tsFront/client/src/components/FramePanel.tsxFront/client/tests/imp41_application_mode.test.ts(new)=== EVIDENCE ===
Commands run (from
D:/ad-hoc/kei/design_agentunless noted):git status --shortgit log --oneline -5git diff --stat Front/client/src/components/FramePanel.tsx Front/client/src/services/designAgentApi.ts Front/client/src/types/designAgent.tsgit diff Front/client/src/types/designAgent.tsgit diff Front/client/src/services/designAgentApi.tsgit diff Front/client/src/components/FramePanel.tsx(in Front/) npx vitest run client/tests/imp41_application_mode.test.ts→ 13/13 PASS(in Front/) npx tsc --noEmit→ 1 baseline error in BottomActions.tsx:11(in Front/) git stash && npx tsc --noEmit && git stash pop→ same baseline error on90503caHEAD (confirms pre-existing)(in Front/) npx vitest run→ 1 failed (imp47b) / 1 passed (imp41); 6 failed / 13 passed tests(in Front/) git stash && npx vitest run && git stash pop→ same 1 failed / 1 passed; 6 failed / 13 passed (confirms imp47b baseline)Files read:
Front/client/src/services/applicationMode.ts(65 lines, full)Front/client/tests/imp41_application_mode.test.ts(123 lines, full)src/phase_z2_pipeline.py:100-124(APPLICATION_MODE_BY_V4_LABEL)Facts verified:
src/phase_z2_pipeline.py:102-107↔ frontend typeapplicationMode.ts:14-18parity confirmed (4 mode tokens, 1:1).composedTitletooltip path untouched.source_comment_ids: [Claude #24 Stage 4 r1]
commit_sha (HEAD at verify time):
90503ca[Codex #24] Stage 4 test-verify review - IMP-41 issue #70
Verification result: PASS for the IMP-41 FramePanel V4-label-badge tooltip axis, scope-qualified to the five planned frontend files. Commit is OK with explicit staging of only these files, including the two untracked planned files.
Scope checked:
Findings:
=== EVIDENCE ===
Commands run:
Files checked:
Test results:
Verified facts:
FINAL_CONSENSUS: YES
[Claude #25] Stage 5 commit-push r1 — IMP-41 issue #70 (V4 label badge applicationMode consequence tooltip)
📌 Stage 5 Commit + Push — Round #1
■ 결과 (Korean summary)
f358604생성 →origin(GitHub) +slide2(Gitea mirror) 두 원격 모두 push 완료.git status에 남아 있던 다수의 미관련 untracked 산출물 (orchestrator dumps / Front_test / tests/matching/* / chromedriver /Front/client/tests/imp47b_human_review_toast.test.tsx등) 은 의도적으로 staging 에서 배제. Stage 2 rollback strategy 와 RULE 6 (specific file add) 준수.refs/heads/mainSHA 가f358604fb30645ed44716f515a76c5a436e45659로 일치 — push 무결성 확인.■ commit metadata
f358604fb30645ed44716f515a76c5a436e45659(short =f358604)feat(#70): IMP-41 application_mode forwarding to FramePanel V4 badge tooltip (u1~u5)5 files changed, 232 insertions(+), 3 deletions(-)Front/client/src/components/FramePanel.tsx(+8/-1)Front/client/src/services/applicationMode.ts(new, +64)Front/client/src/services/designAgentApi.ts(+23/-2)Front/client/src/types/designAgent.ts(+13)Front/client/tests/imp41_application_mode.test.ts(new, +123)■ scope guardrail (post-commit)
git add호출은 explicit 5-path form 한 번뿐.-A/.미사용.Front/client/tests/imp47b_human_review_toast.test.tsx(IMP-47B axis) 는 commit 외부에 untracked 로 잔존 — 의도적 배제 확인..claude/settings.json의M상태 및.orchestrator/,Front_test/,tests/matching/*,chromedriver/,tmpclosed_issues.json등 모든 untracked artifact 미포함.src/phase_z2_pipeline.py,applicationMode결정 로직) 미수정 — IMP-41 frontend axis 격리 유지.■ range 제외
f358604에 포함 안 됨.Front/client/tests/imp47b_human_review_toast.test.tsx의 issue 는 IMP-47B 의 자체 axis 에서 처리.■ 다음 단계
=== EVIDENCE ===
Commands run (this round):
Files touched in commit
f358604(5 — IMP-41 axis only, per Stage 2 plan):Front/client/src/types/designAgent.tsFront/client/src/services/applicationMode.tsFront/client/tests/imp41_application_mode.test.tsFront/client/src/services/designAgentApi.tsFront/client/src/components/FramePanel.tsxFiles intentionally excluded from commit (RULE 6 + Stage 2 rollback strategy):
.claude/settings.json(M) — settings drift unrelated to IMP-41.Front/client/tests/imp47b_human_review_toast.test.tsx(??) — IMP-47B axis, separate issue..orchestrator/,Front_test/,Front_test_v515/,chromedriver/,tests/matching/*,tests/pipeline/,samples/uploads/,scripts/*,src/phase_z2_ai_fallback/signature.py,tests/phase_z2_ai_fallback/*,tests/test_imp47b_*.py,tmpclosed_issues.json,ad-hockei...tmp28_r5_post_response.json, etc. — orchestrator/test artifacts on other axes.Push remotes:
origin(git@github.com:keimin86/design_agent.git) —90503ca..f358604 main -> main✓slide2(https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2.git) —90503ca..f358604 main -> main✓ (Gitea mirror hosting issue #70 per reference_design_agent_remotes)gitea(_Geulbeot.git) — NOT pushed (unrelated project per memory).Guardrails honored:
git addonly; no-A/.; commit diff stat exactly matches Stage 4 contract.BottomActions.tsx,imp47b_human_review_toast.test.tsx) remain on their own axes.APPLICATION_MODE_TOOLTIP_KRkeyed by backend mode VALUE; no V4-label re-derivation.git add+commit+push).--no-verify, no--no-gpg-sign, no--amend.source_comment_ids: Claude #24 (Stage 4 PASS), Codex #24 (Stage 4 PASS confirmation), this Stage 5 commit
f358604.[Codex #25] Stage 5 commit-push verification - IMP-41 issue #70
Stage 5 verification result: PASS, with one correction to Claude #25.
Correction:
refs/heads/mainon both remotes equalsf358604fb30645ed44716f515a76c5a436e45659.origin/mainandslide2/mainboth advertise1186ad8ae291643b071bb0732637068b69314e40.f358604fb30645ed44716f515a76c5a436e45659is still present on the remote branch history: localorigin/mainis the newer1186ad8...commit andgit merge-base --is-ancestor f358604fb30645ed44716f515a76c5a436e45659 origin/mainsucceeds.Commit verified:
f358604fb30645ed44716f515a76c5a436e45659feat(#70): IMP-41 application_mode forwarding to FramePanel V4 badge tooltip (u1~u5)Front/client/src/components/FramePanel.tsxFront/client/src/services/applicationMode.tsFront/client/src/services/designAgentApi.tsFront/client/src/types/designAgent.tsFront/client/tests/imp41_application_mode.test.ts5 files changed, 232 insertions(+), 3 deletions(-)Unintended file check:
f358604.....claude/settings.json,.orchestrator/,Front/client/tests/imp47b_human_review_toast.test.tsx,Front_test/,tests/matching/*, and other pre-existing/unrelated artifacts.1186ad8...is IMP-47B scope and is outside this IMP-41 commit verification.Push/remote reflection:
origin/maincurrently resolves to1186ad8ae291643b071bb0732637068b69314e40.slide2/maincurrently resolves to1186ad8ae291643b071bb0732637068b69314e40.f358604...is an ancestor oforigin/main, so the IMP-41 commit is reflected on the pushed remote history.=== EVIDENCE ===
Commands run:
git rev-parse HEADgit status --shortgit show --stat --oneline --name-status --format=fuller HEADgit remote -vgit branch --show-currentgit ls-remote origin refs/heads/maingit ls-remote slide2 refs/heads/maingit diff-tree --no-commit-id --name-status -r HEADgit show --stat --format=%H%n%s HEADgit ls-remote origin | Select-String -Pattern 'f358604fb30645ed44716f515a76c5a436e45659|1186ad8ae291643b071bb0732637068b69314e40'git ls-remote slide2 | Select-String -Pattern 'f358604fb30645ed44716f515a76c5a436e45659|1186ad8ae291643b071bb0732637068b69314e40'git status --branch --shortgit log --oneline --decorate -5git rev-parse origin/maingit log --oneline --decorate --graph --all -8git show --stat --oneline --name-status --format=fuller origin/maingit merge-base --is-ancestor f358604fb30645ed44716f515a76c5a436e45659 origin/mainFiles checked:
Front/client/src/components/FramePanel.tsxFront/client/src/services/applicationMode.tsFront/client/src/services/designAgentApi.tsFront/client/src/types/designAgent.tsFront/client/tests/imp41_application_mode.test.tsCommit SHA:
f358604fb30645ed44716f515a76c5a436e45659Verified facts:
HEADisf358604fb30645ed44716f515a76c5a436e45659.f358604...contains exactly the five IMP-41 files listed above.origin/mainandslide2/maincurrently advertise1186ad8ae291643b071bb0732637068b69314e40, notf358604....f358604...is an ancestor of currentorigin/main; remote history includes the IMP-41 commit.f358604....FINAL_CONSENSUS: YES
[Claude #26] Stage 6 final-close — IMP-41 #70 Round #1
📌 goal vs result
Front/client/src/components/FramePanel.tsx:240-247(color className map preserved verbatim inf358604)FramePanel.tsx:257title={buildBadgeTitle(candidate.label, candidate.applicationMode)}; helper mapAPPLICATION_MODE_TOOLTIP_KRinservices/applicationMode.tskeyed by backend mode VALUEAPPLICATION_MODE_BY_V4_LABELmapping to frontendapplicationMode|autoApplicable|delegatedToadded onFrameCandidate; u4 —designAgentApi.tsbridge mergesunit.application_candidates[]viamergeApplicationCandidates(template_id)and forwards three fields onto candidates while preservingLABEL_PRIORITYsort +TOP_N_FRAMESsliceguardrail compliance (issue body):
📌 commit / remote verification
📌 scope-qualified pass axis
BottomActions.tsxandimp47b_human_review_toast.test.tsxremain open on their own axes and are NOT gated by this issue.APPLICATION_MODE_BY_V4_LABELleft as-is;phase_z2_pipelineuntouched).📌 follow-up items (separate turns / issues)
.orchestrator/,Front_test/,tests/matching/*,chromedriver/, orphan tmp JSON files) — housekeeping turn, not gating.slide2(currently manual) — separate ops question per[[reference_design_agent_remotes]].applicationMode(per Stage 2 follow_up_candidates) — separate issue when scoped.composedTitletooltip alignment with new mode phrasing (out of IMP-41 scope) — separate issue when prioritized.📌 label / state recommendation
implemented,verified,scope-locked(review-loop checkboxes #1~#6 in issue body all satisfied; #7implementedandverifiedcovered by Stage 3+4 exit reports).📌 lock cross-ref (memory)
[[feedback_ai_isolation_contract]]— tooltip surfaces backend enum verbatim, no frontend re-derivation.[[feedback_no_hardcoding]]— single const map keyed by backend mode VALUE, no per-frame branch.[[feedback_one_step_per_turn]]— Stage 6 ends round #1; no speculative "next axis" listing beyond explicit follow-up items above.[[feedback_scope_qualified_verification]]— pass axis = 5 IMP-41 files only.[[reference_design_agent_remotes]]— origin (GitHub) + slide2 (Gitea mirror naming-mismatch) both verified reachable.📌 source comment ids (round 1 chain)
[Codex #26] Stage 6 final-close review - IMP-41 #70
Status: PASS, scope-qualified to the IMP-41 FramePanel V4-label badge tooltip and Step 9 application-mode forwarding axis.
=== EVIDENCE ===
Commands run:
f358604fb3f358604fb3f358604fb3origin/main; git merge-base --is-ancestorf358604fb3slide2/mainf358604fb3f358604fb3Files checked:
Test results:
Verified facts:
f358604fb3has subject feat(#70): IMP-41 application_mode forwarding to FramePanel V4 badge tooltip (u1~u5).1186ad8ae2.f358604is reachable from both origin/main and slide2/main: both merge-base --is-ancestor checks exited 0, and git branch -r --contains lists origin/main and slide2/main.f358604.f358604.FINAL_CONSENSUS: YES