hn.today

Show HN: Get your coding agent off ~2019 JavaScript, onto modern web primitives

github.com434 points144 comments
Screenshot of Show HN: Get your coding agent off ~2019 JavaScript, onto modern web primitives

Modern Web Guidance is a collection of expert-written skills that supplies coding agents with current web-platform practices, browser compatibility information, and implementation examples. Its purpose is to counter agents’ tendency to reproduce older JavaScript-heavy patterns learned from legacy code, especially when browsers now offer native solutions that can be faster, simpler, and more accessible. The project is stewarded by teams from Google Chrome, Microsoft Edge, Mozilla Firefox, and MDN, together with the web-development community.

An interactive installer adds the guidance to supported coding agents, while a command-line tool can search for a relevant guide, retrieve one by ID, or scan a codebase for patterns worth modernizing. Coverage spans roughly 250 features across CSS and layout, HTML and the DOM, JavaScript APIs, performance, accessibility, forms, and user experience. Examples include container queries, subgrid, view transitions, popovers, anchor positioning, native form validation, scheduling with scheduler.yield, and browser-provided translation and summarization. The guidance emphasizes correct API use, practical production patterns, sensible browser fallbacks, and avoiding unnecessary polyfills or libraries. Its recommendations are designed to be concise enough for an agent’s context window; evaluations help remove material models already handle well. The repository also provides documentation, an evaluation dashboard, and ways to report issues, making it a practical resource for developers who want AI-generated web code to use modern browser capabilities rather than default to dated conventions.

Read on github.com144 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Ggml v1.0.0

Ggml v1.0.0

ggml 1.0.0 removes deprecated public APIs and legacy DIAG_MASK operations, while adding configurable YaRN truncation and FP8 support. It also improves backend performance with quantized matrix multiplication, fused MoE operations, and new attention and scheduling paths. (github.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.