4.2 Stage 2 & 3: Multimodal Visual Geometry & CSS Auto-Patch
chinwag ui-gate --vision-tribunal --auto-patchPatent-pending 3-stage visual bug detection and autonomous CSS/HTML patch synthesis powered by Chinwag Vision-3.
4.2 Stage 2 & 3: Multimodal Visual Geometry & CSS Auto-Patch
chinwag ui-gate --vision-tribunal --auto-patch
⏳ Coming Soon (
v0.2.0·CHWG-PUB-111·⚡ In Flight — Live Autonomous Fleet): While Stage 1 (176/176DOM Physics ·verify-ui-geometry.py) and the Deterministic64/64Copy Gate (verify-copy-declaration.py) are✅ Available Now (v0.1.0), Stage 2 & Stage 3 (chinwag-visual-tribunal-v1multimodal rubric & autonomous CSS/HTML auto-patch LoRA synthesis) are currently in flight forv0.2.0(Chinwag Reflex-1p10: 2026-11-16·p50: 2026-11-20·p90: 2026-11-26). Track live progress via/api/reality-matrixand the Chinwag Public Roadmap.
Deterministic bounding boxes catch overflow and contrast regressions, but they cannot judge whether a dark-mode glass card looks muddy, an SVG diagram has cramped labels, or a call-to-action button lacks visual hierarchy.
For visual semantics and automatic repair, chinwag ui-gate combines Stage 1 DOM physics with Stage 2 (Chinwag Vision-3 64-Question Multimodal Rubric) and Stage 3 (Chinwag Vision-3 Autonomous CSS/HTML Auto-Patch Synthesis).
# Run all 3 stages: DOM physics (0 Cr) -> 16-surface Vision-3 Audit (100 Cr) + Drop-In CSS Fix & Closed-Loop Re-Verify (200 Cr total!)
chinwag ui-gate --url http://localhost:3000 --stage 3 --auto-patch
Architecture of the 3-Stage Visual Pipeline
+-----------------------------------------------------------------------------------+
| STAGE 1: Deterministic 12-Tuple DOM Physics (Local Headless Chromium · <900ms) |
| 8 Viewports × 2 Themes × 11 Invariants = 176/176 Mathematical Assertions (0 Cr) |
+-----------------------------------------+-----------------------------------------+
|
v (DOM Snapshot + 16 Viewport Renders)
+-----------------------------------------------------------------------------------+
| STAGE 2 & 3: Chinwag Vision-3 16-Surface Geometry + CSS Auto-Patch (100 / 200 Cr) |
| Evaluates visual hierarchy, typography rhythm, surface elevation, icon optical |
| balance, dark/light polarity harmony, and component spacing density across |
| all 16 surfaces (100 Cr); synthesizes a drop-in CSS/DOM fix inside an isolated |
| Shadow jj workspace and re-verifies all 16 surfaces (200 Cr total). |
| Unchanged DOM/CSS trees hit the BLAKE3 Visual Cache -> 0 Cr (Free)! |
+-----------------------------------------------------------------------------------+
Stage 2: The 64-Question Chinwag Vision-3 16-Surface Design Rubric (100 Cr · $0.64 on Growth Pack)
When Stage 2 runs, chinwag ui-gate computes a deterministic BLAKE3 visual fingerprint over the rendered DOM structure and computed styles. If the visual fingerprint matches a previously approved commit, Stage 2 returns an instant cache hit at 0 Cr.
When visual changes are present, Chinwag Vision-3 evaluates the 16 viewport renders against 64 structured visual criteria grouped into 8 domains (8 questions per domain):
- Typographic Hierarchy & Rhythm (
Q01..Q08): Display scale cadence, heading-to-body contrast, optical kerning, line-height breathing room, and code block legibility. - Surface Elevation & Border Hairlines (
Q09..Q16): Card-on-canvas separation,1pxborder luminance, subtle glass blur discipline, and shadow softness acrossMidnightandDaylight. - Color Polarity & Semantic Accent Discipline (
Q17..Q24): Restraint of primary emerald (#38F2AF/#0B7A53) and sky (#58A6FF) accents, semantic badge clarity, and zero washed-out grays in light mode. - Navigation & Wayfinding Clarity (
Q25..Q32): Active route indicators, breadcrumb legibility, search trigger discoverability (⌘K), and mobile drawer ergonomics. - Data Density & Table Alignment (
Q33..Q40): Column header alignment, numeric right-alignment withtabular-nums, row hover affordances, and responsive scroll indicators. - Interactive Affordance & State Feedback (
Q41..Q48): Primary vs. secondary CTA distinction, focus-visible ring clarity, disabled state legibility, and copy-button feedback. - Diagram, Icon & Media Framing (
Q49..Q56): SVG stroke consistency, diagram padding, aspect-ratio preservation, and zero clipped badges inside cards. - Responsive Reflow & Whitespace Balance (
Q57..Q64): Section vertical cadence, balanced multi-column Collapse on1024pxand768px, and mobile thumb-zone spacing.
Stage 3: Autonomous CSS/HTML Auto-Patch Synthesis & Closed-Loop 16-Surface Re-Verification (200 Cr Total · $1.28 on Growth Pack)
Instead of dumping a list of UI complaints into a PR comment and waiting for a human designer, Stage 3 (--auto-patch) repairs the stylesheet or component markup automatically and seals a permanent visual proof into your Git timeline:
- Defect Localization: Maps each failed Stage 1 invariant (
GEO-01..GEO-11) or Stage 2 rubric item (Q01..Q64) back to its exact source component and CSS rule via source maps. - Isolated Patch Synthesis: Chinwag Vision-3 generates a minimal, token-compliant CSS/HTML patch inside the task's isolated
Shadow jjworkspace (always using existing CSS custom properties rather than hard-coded hex values). - Closed-Loop Verification: Re-runs Stage 1 (
176/176) and Stage 2 (64/64) against the patched build across all 16 surfaces (32total VLM GPU surface evaluations). The patch is only committed if zero regressions are introduced across all 16 viewport-theme surfaces.
Real Auto-Patch Case Study
--- a/assets/css/pricing-grid.css
+++ b/assets/css/pricing-grid.css
@@ -18,7 +18,9 @@
.credit-schedule-wrapper {
width: 100%;
+ max-width: 100%;
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
}
.tier-card .muted-footnote {
- color: #7A8291;
+ color: var(--cw-text-secondary); /* 6.8:1 in Daylight, 8.4:1 in Midnight */
font-variant-numeric: tabular-nums;
}
Unified Credit Schedule for chinwag ui-gate
| Stage | Execution Engine | Managed Credits | Cost on Growth Pack ($0.0064/cr) |
|---|---|---|---|
Stage 1 (176/176 DOM Physics) | Local Headless Chromium | 0 Cr (Free) | $0 (Free) |
Stage 2 (64/64 Vision-3 Visual Geometry · Cache Hit) | Local BLAKE3 Visual Cache | 0 Cr (Free) | $0 (Free) |
Stage 2 (Vision-3 16-Surface Multimodal Audit · 8 viewports × 2 themes) | Chinwag Vision-3 | 100 Cr | $0.64 ($0.50 on Org Volume) |
Stage 2 + 3 (Vision-3 16-Surface Audit + Drop-In CSS Auto-Patch + Closed-Loop 16-Surface Re-Verify) | Chinwag Vision-3 + Shadow jj | 200 Cr | $1.28 ($1.00 on Org Volume) |
Next Steps
- Next: Deterministic 64/64 Declaration Copy Gate (
INV-DECLARATION-COPY-GATE-01) - Ready to eliminate visual regressions before merge? Reserve Your Organization Credit Pack →
12-Tuple DOM Geometry (176/176)
How chinwag ui-gate evaluates 11 mathematical bounding-box, typography, and contrast invariants across 8 viewports and 2 themes in under 900ms locally at 0 Cr.
64/64 Declaration Copy Gate
How Chinwag enforces editorial clarity, canonical product terminology, and zero leak invariants across marketing and documentation commits.