Image: GitHub
Why it mattersCoding agents write old patterns because their training data is old. A shared rulebook gives a team one file to drop into Claude Code or Cursor.
Coding agents still write JavaScript the way people wrote it in 2019. The browser vendors just published a cure. On 11 November, Chrome, Microsoft Edge, Firefox and MDN opened a shared GitHub repository. The repository is called GoogleChrome/modern-web-guidance. It holds 200 guides for modern web platform features. The project says model training data is full of old code. That is why agents default to the old way.
The repository has 5,300 stars, 176 forks and 216 commits on main. The license is Apache-2.0. Paul Irish of Google Chrome posted it to Show HN. The post took 427 points in a day.
What the guides cover
The 200 entries name the modern primitives an agent should reach for. CSS gets container queries, subgrid, view transitions and anchor positioning. Forms get the native popover API, field-sizing and switch controls. Performance covers the Scheduler API, scroll-driven animations and fetchLater. A group covers the browser's own AI features. Those are on-device language models, translators and summarisers.
The README names three patterns to stop producing. Heavy JavaScript replacements for native form controls. Polyfills where a light fallback would do. Manual layout maths where a native CSS rule exists. Paul Irish wrote on Show HN that the aim is "a 1-line CSS solution over 60 lines of ResizeObserver/setTimeout business".
The numbers Google reports
Google says agents using the guides went from 55 percent to 92 percent correct on a 200-task set. That is Google's own figure. The repository also carries a tool called legacy-scan. Google trained it on 30,000 GitHub repositories. Google says the tool finds legacy patterns with 92 percent precision. The report does not state a recall figure. The evaluation is Google's.
Why four browser vendors in one repository
Chrome, Edge, Firefox and MDN govern the project together. That is rare for guidance on what to build for the web. The README says the default scope is "Baseline Widely Available" features. That covers major browsers from two and a half years ago. The guides write to that bar. They do not write to the newest Chrome-only feature.
A team using Claude Code, Cursor, Codex or another coding agent can drop the guides into the project. Load them as a skill or a context file. The agent then reaches for <dialog> and container queries. It stops reaching for a React modal and a window resize listener. The precision figure is a claim about legacy-scan. The 92 percent pass rate is a claim about Google's 200-task set. Both are claims to check on your own codebase.
Source
GoogleChrome/modern-web-guidance on GitHub. Show HN discussion.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.
