# Spec Compliance Evaluator ## Purpose This evaluator assesses how well iterations adhere to specifications across four dimensions: requirements met, naming conventions, structure adherence, and quality standards. It uses ReAct reasoning to make objective, checklist-based assessments. ## Evaluation Process ### THOUGHT Phase: Pre-Evaluation Reasoning Before scoring, reason about: 1. **What specification compliance means** - Following explicit requirements - Adhering to stated conventions - Meeting quality baselines - Honoring constraints 2. **Why compliance matters** - Ensures consistency across iterations - Demonstrates attention to requirements - Validates understanding of spec - Enables fair comparison 3. **How to assess compliance objectively** - Treat spec as checklist - Each requirement is binary (met/not met) or scored - Look for explicit evidence - Avoid interpretation beyond spec ### ACTION Phase: Compliance Assessment #### 1. Requirements Met Assessment (0-40 points) **Load the specification and create requirement checklist:** **Functional Requirements (0-16 points)** For each functional requirement in spec: - Fully met: Full points - Partially met: Half points - Not met: 0 points Example checklist: ``` Spec: "Display meaningful data using charts" ✓ Met: Has chart displaying temperature data [4/4 points] Spec: "Support at least one dataset with minimum 20 data points" ✓ Met: Dataset has 50 points [4/4 points] Spec: "Implement smooth transitions and animations" ⚠ Partial: Has transitions but not smooth [2/4 points] Spec: "Provide user controls" ✓ Met: Has 3 control buttons and 1 slider [4/4 points] Spec: "Respond to user input with visual feedback" ✗ Not Met: No visual feedback on button click [0/4 points] ``` Score: 14/16 points **Technical Requirements (0-12 points)** Check each technical requirement: Example checklist: ``` Spec: "Single HTML file (self-contained)" ✓ Met: Single file, all embedded [4/4 points] Spec: "Embedded CSS in