Modern Web Guidance 1.0: The web platform expertise your coding agent is missing
The Modern Web Guidance 1.0 project provides an expert-vetted knowledge base for coding agents to ensure AI-generated code follows current web standards.
Deep dive
- Provides expert-vetted guides for coding agents to prevent common AI mistakes.
- Adds a modernization workflow to scan existing code for legacy patterns.
- Supported by Chrome, Firefox, and Edge to ensure cross-browser compatibility.
- Leverages Baseline data to inform best practices.
- Includes public evaluation dashboards to track improvements.
- Enables tighter integration with Chrome DevTools for agents to debug performance in real-time.
- Case studies show significantly reduced UI bugs and faster debugging at scale.
Decoder
- Baseline: A cross-browser initiative that defines a set of features that are stable and widely available across all major browser engines.
- Inert management: A technique used to tell the browser which parts of the page should be ignored by assistive technology, such as during a modal overlay.
Original article
Modern Web Guidance 1.0: The web platform expertise your coding agent is missing
In this new era of agentic web development, developers expect their coding agents to be experts at building for the web. And while the latest frontier coding models are quite capable and can usually produce something that works, if you ask a web development expert to review the AI-generated code, they can almost always find ways to make the code faster, more accessible, or more secure.
Chrome is investing heavily in the future of agentic web development, and to address this challenge, we introduced an early preview of Modern Web Guidance at Google I/O in May. Modern Web Guidance is a set of skills that embed web platform expertise, best practices, and browser compatibility data directly into your coding agents.
Today we're excited to announce the stable release of Modern Web Guidance version 1.0, which includes:
- New modernization workflow that scans your existing codebase to help your agent find opportunities to safely modernize.
- Expanded guide database targeting hundreds of verified AI knowledge gaps with expert-vetted, cross-browser solutions.
- Deeper human expert review for every guide, including sign-off from content area tech leads and a dedicated accessibility review on our user-facing guides.
- Full evaluation coverage across all of our guides with a public eval dashboard showing the measurable improvements compared to agents without Modern Web Guidance.
With version 1.0, we're also excited to share that Modern Web Guidance is becoming a cross-browser effort, with Firefox and Edge joining Chrome to support, improve cross-browser compatibility, and contribute to the project. Building on our shared work with Baseline, our goal is to ensure that anyone coding with an agent can take full advantage of the power and capabilities of the modern web platform.
Regardless of what models or agent harnesses you're using, if you're building for the web, Modern Web Guidance belongs in your agentic workflow.
To install Modern Web Guidance, run this command from your project directory:
npx modern-web-guidance@latest install
Or if you already installed an earlier version, you can update to 1.0 by running:
npx modern-web-guidance@latest update
Why developers and businesses should use Modern Web Guidance
It's undeniable that coding agents have helped developers write code faster than ever before. But in a world where everyone is using coding agents, speed is no longer a competitive advantage.
These days, it's more important than ever to differentiate on fundamental factors like usability and quality of experience. Here are a few ways Modern Web Guidance can help:
Reinforce best practices that models often miss
While frontier coding models do have a good grasp on many best practices, our evals show that there are still a number of important areas where they fall short, such as:
- Accessibility: Keyboard focus and inert management, reduced-motion support, and accessible form validation.
- User experience: Swipe and touch gestures, dialog and popover transitions, and light/dark theme implementations.
- Performance: Main-thread task scheduling, offscreen rendering isolation, and layout shift prevention.
- Security: Safe HTML sanitization, strict Content Security Policies, and passkey credential management.
Accessibility best practices are particularly important to get right because mistakes like bad ARIA can make a page less accessible than no ARIA at all. For version 1.0, our user-facing guides were reviewed and tested with real assistive technologies by accessibility experts who rely on them every day.
Use the best web feature for the job
AI models are very good at figuring out how to make something work with JavaScript, but in many cases, there are HTML or CSS features that can do the same thing with much less code. And since they're handled by the browser, they usually perform better and come with accessibility affordances. For example:
- Features to animate popovers and dialogs
- Features to enhance scroll- and swipe-based interactions
- Better APIs for smooth and fluid page transitions
New features can also improve the experience of a site in ways that matter to users. For example:
- Passkeys and WebAuthn: For faster and more secure login experiences
- Autofill: To improve checkout flows (especially on mobile) that often fail when using custom JavaScript-based form controls
Modern Web Guidance is designed to recommend the best feature for the job, based on your browser support requirements. Its guides have embedded Baseline and browser compatibility data, so it can tailor its recommendations to your project's needs.
Scan your codebase and find opportunities to modernize
Most web development doesn't happen in brand-new projects. It happens in existing codebases that have accumulated years of outdated workarounds, unnecessary dependencies, and polyfills that are no longer needed.
Version 1.0 adds a new modernization workflow that can analyze your existing HTML, CSS, JavaScript, and package.json to find opportunities to safely upgrade, and then guide your agent through the changes.
/modern-web-guidance Modernize the code in this directory
Stay up to date as the web platform evolves
The web platform is a moving target. New features ship in browsers every milestone, and existing features that you perhaps couldn't use before are becoming Baseline with each new browser release.
Since Modern Web Guidance is built on top of Baseline compatibility data, and its recommendations are maintained by browser engineers, web standards experts, and accessibility specialists, these recommendations evolve along with the platform itself, and now your project can too.
Learn about new web features and best practices
While Modern Web Guidance is primarily built as a tool for agents, one thing we've heard from many developers is that they've actually found the guidance to be quite useful on its own—as a learning resource.
Pair Modern Web Guidance with Chrome DevTools for agents
In agentic web development, authoring code is only one part of the workflow. You also need to run that code to ensure it works as expected. This is why we recommend developers use Modern Web Guidance along with Chrome DevTools for agents.
- Modern Web Guidance gives your agent the up-front expertise needed to write code following modern best practices.
- Chrome DevTools for agents gives your agent runtime visibility so it can verify, debug, and optimize that code across a wide range of device capabilities, user preferences, and network conditions.
Optimize until you hit your performance target
Modern Web Guidance can teach your agent how to effectively break up long-running JavaScript tasks that block the main thread, but it can't test your code to see how long those JavaScript tasks actually block the main thread for.
Test and refine your animations
Modern Web Guidance can show your agent how to properly and performantly animate features like modal dialogs, tooltips, and popover menus, but even with this guidance you still need to verify that the animations actually work and look good when used in the context of your full application.
Cache views without memory leaks
Modern Web Guidance can teach your agent how to make SPA transitions feel instant by rendering and caching views in memory, while also properly hiding them from the accessibility tree.
Success stories
Pensionbazaar and Policybazaar
Pensionbazaar, a new retirement planning platform launched by Indian fintech company Paisabazaar, paired Modern Web Guidance with Chrome DevTools for agents to build and verify new pages, shortening turnaround by more than 90% and reducing UI bugs on new screens by over 90%.
"For Pensionbazaar, our priority was building quality code from day one to avoid technical debt later. Modern Web Guidance steered our coding agent to adopt modern web standards and performance best practices while respecting our specific browser compatibility targets. This made our frontend code reviews substantially easier and faster, ultimately improving our development turnaround time."
—Aman Soni, Engineering Manager, Policybazaar
WeTV
WeTV, Tencent's international video streaming platform, added an AI coding agent to its CI/CD pipeline that uses Chrome DevTools for agents to diagnose performance regressions and Modern Web Guidance to fix them using modern web platform features.
"The results have been very effective in terms of both speed and quality. The diagnostic insights provided by Chrome DevTools for agents and Modern Web Guidance gave us reliable references for fixing complex layout issues. We perform strict verification after every fix, and the current success rate and stability have significantly improved our release confidence."
—Yangjie Zheng, Head of Engineering, WeTV (Tencent)
note inc.
note inc., one of Japan's largest creator and media platforms with over 90 million monthly active users, used Modern Web Guidance alongside its in-house design system as part of an ongoing effort to modernize its Next.js frontend.
"Our mission at note is 'Start, and Keep on Creating,' so our platform has to stay fast and accessible for every creator and reader. As more of our code is written with AI coding agents, Modern Web Guidance helps them reach for modern, standards-based solutions instead of falling back on older JavaScript patterns. It also points out details that are easy to miss, such as image loading priority and form accessibility. Combined with our design system, it lets us keep improving note while keeping our UI consistent."
—Takehiko Itabashi, VP of Technology, note inc.
MetaMask
MetaMask, a self-custodial financial platform with more than 100 million downloads across approximately 190 countries, runs Modern Web Guidance as an automated review bot on every pull request to its open source browser extension.
"The reviews are really helpful. They've helped surface and get our engineers familiar with modern APIs like Interest invokers and the Popover API. It hasn't increased PR review times, if anything it likely reduced them. The issues MWG caught would have otherwise required a human reviewer familiar with these modern web techniques."
—Francis Nepomuceno, UX Engineer, MetaMask
Get started with Modern Web Guidance
To add Modern Web Guidance to your project, run the CLI installer from your project directory:
npx modern-web-guidance@latest install
Or if you already installed an earlier version, you can update to 1.0 by running:
npx modern-web-guidance@latest update Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi