# Change Request: CR-002

> Created: 02-15-2026
> Status: Approved
> Classification: Modification
> Related Feature: FEATURE-030-B-MOCKUP

## Request Details

**Requestor:** Human (project owner)
**Date Received:** 02-15-2026
**Priority:** High

## Description

Improve the UIUX reference mockup workflow based on feedback from executing the workflow on https://www.baidu.com (TASK-452). Four changes address mockup scope, validation accuracy, data persistence timing, and rubric completeness:

1. **Bounding box scope enforcement** (LL-008): Mockup generation must reproduce ONLY the content within the selected component's bounding box. Currently the agent generates a full-page mockup even when a partial area is selected.

2. **99% validation accuracy** (LL-009): Raise the validation target from ~90% to 99% with property-level checks (exact hex color match, 1px spacing tolerance, font property match). Replace coarse screenshot comparison with per-property validation.

3. **Analyze-phase data persistence** (LL-010): Save all analysis artifacts (screenshots, component data, rubric results) to the idea folder immediately during the analyze phase, not waiting for the generate phase. Prevents data loss on session crash.

4. **6-dimension validation rubric** (LL-011): Add a 6th dimension "Static Resources" (fonts loaded, icons/SVGs, images, background images) to the existing 5-dimension rubric. Each dimension gets detailed sub-checks instead of coarse confident/uncertain/missing scoring.

## Business Justification

- Data loss risk: analysis data only exists in memory until generate phase — a session crash loses everything
- Mockup quality: ~90% threshold produces visibly wrong output (gradient vs flat color, wrong font-weight)
- Scope violation: generating full-page mockup when user selected partial area wastes effort and produces wrong result
- Incomplete validation: missing static resource checks means fonts/icons may not match original

## Impact Analysis

### Classification

**Type:** Modification to FEATURE-030-B-MOCKUP

**Reasoning:**
All 4 changes operate within the existing 4-step wizard workflow (select → instruct → analyze → generate). Same users (CLI agents + human), same UI (toolbar), same API endpoint. Changes extend existing acceptance criteria and agent behavior — no new screens, endpoints, or user types. Specifically:
- Scope enforcement extends AC-M19 (validation) behavior
- 99% target modifies AC-M19/AC-M20 thresholds and AC-M24-M26 tolerances
- Analyze persistence extends the analyze flow (Step 3) with a new sub-step
- 6th rubric dimension extends AC-M12

### Comparison Matrix

| Aspect | CR Requirement | Existing Feature |
|--------|---------------|------------------|
| Users | CLI agents + human (same) | CLI agents + human |
| Workflow | Same 4-step wizard; adds persistence at Step 3 | 4-step wizard |
| Data Model | Extended: html_css, static_resources, 6th dimension | 5-dimension rubric, minimal capture |
| UI Elements | No changes | Toolbar mockup mode |
| API Endpoints | Same (extended payload handled by TASK-454) | POST /api/ideas/uiux-reference |

### Affected Components

| Component | Impact Level | Details |
|-----------|--------------|---------|
| FEATURE-030-B-MOCKUP specification | High | Update ACs for validation threshold, scope, persistence, rubric |
| SKILL.md (x-ipe-tool-uiux-reference) | High | Update agent instructions for all 4 changes |
| FEATURE-033 specification | Medium | Extended data schema (separate CR-001) |
| uiux_reference_service.py | Low | Already implemented in TASK-454 |

### Dependencies

- TASK-454 (completed): Backend structured output already supports new data schema
- FEATURE-033 CR-001: Extended data schema for save_uiux_reference

## Proposed Approach

1. Update FEATURE-030-B-MOCKUP specification:
   - Modify AC-M12: expand rubric from 5 to 6 dimensions with detailed sub-checks
   - Modify AC-M19: change validation target from ~90% to 99%
   - Modify AC-M24-M26: tighten screenshot tolerance from 5% to 1%
   - Add new ACs for bounding box scope enforcement and analyze-phase persistence
   - Update FR-M17 screenshot tolerance
   - Add FR for analyze-phase persistence

2. After specification update, proceed to Feature Refinement to update the agent skill (SKILL.md)

## Mockup Impact

**UI/UX Change:** No — changes are agent behavior only, not toolbar UI

## Approval

- [x] Classification approved by human
- [x] Approach approved by human
- [x] Ready for execution

## Execution

**Classification Result:** modification

**Actions Taken:**
- [x] CR document created in feature folder
- [x] Specification Version History updated with CR link
- [ ] Next task type set: x-ipe-task-based-feature-refinement

## Links

- Feature Specification: [specification.md](./specification.md)
- Lesson Learned: [x-ipe-meta-lesson-learned.md](../../skill-meta/x-ipe-tool-uiux-reference/x-ipe-meta-lesson-learned.md)
- Related CR: [FEATURE-033/CR-001.md](../FEATURE-033/CR-001.md)

---

## Change History

| Date | Change | By |
|------|--------|----|
| 02-15-2026 | CR created based on LL-008..LL-011 | Sage (agent) |
