// Agent profile
modern-web-guidance (GoogleChrome/modern-web-guidance-src) is a structured knowledge base of modern web development best practices specifically formatted for consumption by AI coding agents. Rather than training models on outdated Stack Overflow answers and deprecated API docs, this project provides curated, up-to-date guidance on HTML, CSS, JavaScript, Web APIs, performance, accessibility, and security patterns. Each guidance entry includes the recommended pattern, common anti-patterns to avoid, browser compatibility notes, and code examples. Designed by the Google Chrome team to improve the quality of AI-generated web code. Trending at +1,340 stars/day, 4.8K stars.
modern-web-guidance addresses a specific problem: AI coding agents write web code using patterns they learned from training data, which includes years of outdated tutorials, deprecated API usage, and pre-modern workarounds. When a coding agent generates document.write(), uses synchronous XHR, or builds a modal without focus trapping, it’s not because the model is bad — it’s because bad patterns are overrepresented in its training data.
This project, maintained by the Google Chrome team, provides a structured alternative. Each entry in the knowledge base covers a specific web development topic with the recommended modern pattern, common anti-patterns to avoid (and why), browser support status, and working code examples. The format is designed for retrieval-augmented generation: agents can query the knowledge base for specific topics and get authoritative, current guidance in a format they can directly apply.
Structured guidance format: Each topic follows a consistent schema — recommended approach, anti-patterns, browser compatibility, code examples, and references. This consistency makes the knowledge base reliable for automated consumption: agents don’t need to parse free-form documentation to extract actionable guidance.
Anti-pattern documentation: Perhaps the most valuable section of each entry. Rather than just showing the right way, each topic catalogs the specific wrong patterns that AI models commonly generate — with explanations of why they’re wrong and what to use instead. This directly addresses the most common failure mode of AI-generated web code.
Performance patterns: Guidance entries cover Core Web Vitals optimization, resource loading strategies (preload, prefetch, preconnect), image optimization, font loading, JavaScript execution timing, and layout stability prevention. Each pattern includes measurable impact and when to apply it.
Accessibility patterns: WCAG AA-compliant implementations for common components: modals, dropdowns, tabs, accordions, carousels, toast notifications, and forms. Each pattern includes keyboard navigation, screen reader behavior, focus management, and ARIA attribute usage.
AI coding agent builders who want to improve the quality of their agent’s frontend code output. MCP server developers building web development tools that need a reliable knowledge base. Teams using coding agents for frontend work who want to enforce modern patterns. Browser extension developers who need authoritative guidance on current Web API best practices.
The knowledge base focuses on vanilla HTML/CSS/JS and Web APIs — framework-specific patterns (React, Vue, Svelte) are largely out of scope. It’s a reference, not a tutorial: entries assume the consuming agent understands web development fundamentals and needs guidance on current best practices, not an introduction to the topic. Coverage is growing but not exhaustive — Chrome team priorities influence which topics get entries first.
Open protocol for connecting AI agents to frontend applications — a universal contract for streaming events, tool calls, and state between agents and UIs.
Rust-based browser automation CLI from Vercel Labs that lets AI agents drive browsers one command at a time via accessibility-tree snapshots.
Rust-based desktop computer-use framework from Vercel Labs — agents control apps via accessibility trees instead of screenshots.