Writing

Why Do AI Agents Still Write 2019 JavaScript? 'Modern Web Guidance 1.0' Setup Guide

Even when Claude Code and Cursor know modern CSS and HTML APIs by name, they fail 45% of the time and default to legacy 2019 JavaScript. Learn how to install Modern Web Guidance 1.0 without telemetry and scan your codebase with legacy-scan.

Furkan ÖzayNovember 11, 2026 · 2 min read
czCZAY.DEV // EDITORIALEN
JAVASCRIPT CORE

#Frontend · 2 MIN READ

FURKAN ÖZAYVOL. 2026 // #3889
JS

Even when Claude Code, Cursor, or other AI coding agents know a modern CSS or HTML feature by name, they fail 45% of the time when writing code and revert to 2019-era JavaScript workarounds.

Built over 9 months by Google Chrome engineers Paul Irish and Philip Walton—and now stewarded alongside Mozilla Firefox, MDN, and Microsoft Edge in its 1.0 release—GoogleChrome/modern-web-guidance evaluated agents across 200 real-world tasks and 1,700+ Playwright & AST assertions:

  • Unguided AI Agent Pass Rate: 55%
  • Guided with Modern Web Guidance 1.0: 92%
· · ·

1. Telemetry-Free Installation (DISABLE_TELEMETRY=1)

By default, the interactive installer sends anonymous usage events to Google Analytics 4. Always prepend DISABLE_TELEMETRY=1:

Bash
DISABLE_TELEMETRY=1 npx @google/modern-web-guidance -y

2. Scan Your Existing Codebase (legacy-scan)

Trained on 30,000 GitHub repositories with 92% precision, legacy-scan flags legacy 2019 patterns in your project that can be replaced with native <dialog>, Popover API, field-sizing: content, or CSS.highlights:

Bash
npx @google/modern-web-guidance legacy-scan ./src

3. Protect Safari & Firefox Users (~38 Chrome-Only Features)

Roughly 38 of the 217 features in the catalog are currently Chromium-only. Add a .mwgrc file to enforce @supports fallbacks:

JSON
{
  "telemetry": false,
  "baseline": "widely-available",
  "requireFallbackForLimitedAvailability": true
}

Read next