Keep your coding agent up to date with the latest web best practices
Release v0.0.185
github-actions[bot]457c381def89
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 42601be..95843fb 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -8,7 +8,7 @@"name": "modern-web-guidance","source": "./","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.184"+ "version": "0.0.185"}]}diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex cda6a3a..77a419a 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.184",+ "version": "0.0.185","author": {"name": "Google Chrome"}diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.jsonindex d5024c0..0bca76a 100644--- a/.cursor-plugin/plugin.json+++ b/.cursor-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.",- "version": "0.0.184",+ "version": "0.0.185","author": {"name": "Google Chrome"}diff --git a/.github/plugin/plugin.json b/.github/plugin/plugin.jsonindex d5024c0..0bca76a 100644--- a/.github/plugin/plugin.json+++ b/.github/plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.",- "version": "0.0.184",+ "version": "0.0.185","author": {"name": "Google Chrome"}diff --git a/.grok-plugin/marketplace.json b/.grok-plugin/marketplace.jsonindex 42601be..95843fb 100644--- a/.grok-plugin/marketplace.json+++ b/.grok-plugin/marketplace.json@@ -8,7 +8,7 @@"name": "modern-web-guidance","source": "./","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.184"+ "version": "0.0.185"}]}diff --git a/README.md b/README.mdindex 6da21f5..b11f389 100644--- a/README.md+++ b/README.md@@ -427,16 +427,16 @@ We developed a robust eval harness to ensure that the content is **empirically p<!-- INJECT_EVAL_RESULTS_START -->| Date | Agent + Model | Tasks / Assertions | Unguided → Guided (Uplift) || :--- | :--- | :---: | :---: |+| Aug 24 | claude_code (opus-5) | 131 / 1033 | 57% → 92% (**+35pp**) |+| Aug 24 | antigravity (gemini-3.7-flash-medium) | 131 / 1118 | 60% → 89% (**+29pp**) |+| Aug 21 | codex_cli (gpt-5.6-sol) | 131 / 1118 | 60% → 81% (**+21pp**) |+| Aug 21 | claude_code (opus-5) | 131 / 1086 | 57% → 90% (**+33pp**) |+| Aug 21 | antigravity (gemini-3.7-flash-medium) | 131 / 1118 | 60% → 90% (**+30pp**) || Aug 17 | codex_cli (gpt-5.6-sol) | 130 / 1112 | 60% → 83% (**+23pp**) || Aug 17 | claude_code (opus-5) | 130 / 1033 | 58% → 92% (**+34pp**) |-| Aug 17 | antigravity (gemini-launch-candidate) | 130 / 1112 | 64% → 90% (**+26pp**) |+| Aug 17 | antigravity (gemini-3.7-flash-medium) | 130 / 1112 | 64% → 90% (**+26pp**) || Aug 14 | codex_cli (gpt-5.6-sol) | 132 / 1125 | 60% → 82% (**+22pp**) || Aug 14 | claude_code (opus-5) | 132 / 1036 | 56% → 90% (**+34pp**) |-| Aug 14 | antigravity (Gemini 3.7 Flash Preview) | 132 / 1125 | 62% → 89% (**+27pp**) |-| Aug 10 | codex_cli (gpt-5.5) | 130 / 1112 | 55% → 83% (**+28pp**) |-| Aug 10 | claude_code (sonnet-5) | 130 / 1112 | 54% → 87% (**+33pp**) |-| Aug 10 | antigravity (gemini-3.6-flash) | 130 / 1112 | 57% → 89% (**+32pp**) |-| Aug 7 | codex_cli (gpt-5.5) | 130 / 1112 | 56% → 83% (**+27pp**) |<!-- INJECT_EVAL_RESULTS_END -->diff --git a/gemini-extension.json b/gemini-extension.jsonindex cda6a3a..77a419a 100644--- a/gemini-extension.json+++ b/gemini-extension.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.184",+ "version": "0.0.185","author": {"name": "Google Chrome"}diff --git a/kimi.plugin.json b/kimi.plugin.jsonindex e9d10c7..fbe9ff9 100644--- a/kimi.plugin.json+++ b/kimi.plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.",- "version": "0.0.184",+ "version": "0.0.185","author": {"name": "Google Chrome"},diff --git a/package.json b/package.jsonindex f341d48..d3e063a 100644--- a/package.json+++ b/package.json@@ -3,7 +3,7 @@"displayName": "Modern Web Guidance","description": "Keep your agent up to date on the latest web best practices.","license": "Apache-2.0",- "version": "0.0.184",+ "version": "0.0.185","publisher": "GoogleChrome","repository": {"url": "https://github.com/GoogleChrome/modern-web-guidance-src"diff --git a/skills/modern-web-guidance/guides/built-in-ai/translator.md b/skills/modern-web-guidance/guides/built-in-ai/translator.mdindex 683d679..9bec3c6 100644--- a/skills/modern-web-guidance/guides/built-in-ai/translator.md+++ b/skills/modern-web-guidance/guides/built-in-ai/translator.md@@ -3,6 +3,11 @@ The **Translator API** allows developers to perform client-side text translation## Prerequisites & Requirements+### API Surface & Global Scope++- **MANDATORY:** Access the Translator API exclusively via the global `Translator` interface (`window.Translator` / `self.Translator`).+- **DO NOT** use or check the deprecated `window.ai.translator` namespace.+### Browser Support- **Chrome:** Version 138+ (Desktop only).@@ -22,24 +27,35 @@ To run Gemini Nano and associated models, the system needs:## Implementation & Code Samples-### 1. Checking Availability & Downloading Models+### 1. Checking Availability & Model Management++**Mandatory Options Passing:** You must pass the identical configuration options object containing `sourceLanguage` and `targetLanguage` to both `Translator.availability(options)` and `Translator.create(options)`.-**Mandatory Options Passing:** You must pass the identical configuration options object to both `Translator.availability(options)` and `Translator.create(options)`.+**Recommended Progress Monitoring:** You should implement a monitor for model download progress by providing a `monitor(m)` callback to `Translator.create()` and adding a listener for the `downloadprogress` event, so the user can see model download progress.-**Mandatory Progress Monitoring:** You MUST implement a monitor for model download progress by providing a `monitor(m)` callback to `Translator.create()` and adding a listener for the `downloadprogress` event.+**User Gesture Requirement:** When calling `availability(options)` returns `'downloadable'` or `'downloading'`, calling `Translator.create()` triggers the download of the language pack and **strictly requires a user gesture** (such as a button click) to prevent a `NotAllowedError`.-**User Gesture Requirement:** When `availability` is `'downloadable'`, triggering the model download via `Translator.create()` requires a user gesture (such as a button click listener context). Unconditional page-load calls will trigger a `NotAllowedError`.+`Translator.availability(options)` returns one of four string statuses:+- `'available'`: The language pair model is already downloaded on the device and ready for immediate translation.+- `'downloadable'`: The language pair is supported, but the model needs to be downloaded. A user gesture is required to initiate `Translator.create()`.+- `'downloading'`: The language pack is currently in the process of downloading. Calling `Translator.create()` with a user gesture attaches to the download.+- `'unavailable'`: The language pair or device is not supported. Execute your fallback strategy.```javascript+// Language pair options passed to both availability() and create()const options = {- sourceLanguage: 'es',- targetLanguage: 'fr',+ sourceLanguage: 'es', // Example BCP 47 language code+ targetLanguage: 'fr', // Example BCP 47 language code};+// 1. Check availability for the language pairconst availability = await Translator.availability(options);-if (availability === 'available' || availability === 'downloadable') {- // A user gesture is strictly required to trigger create when downloadable+if (availability === 'available') {+ // Model is ready immediately on device+ const translator = await Translator.create(options);+} else if (availability === 'downloadable' || availability === 'downloading') {+ // User gesture is strictly required before create() triggers or attaches to downloaddocument.getElementById('start-translation-btn').addEventListener('click', async () => {const translator = await Translator.create({...options,@@ -50,19 +66,28 @@ if (availability === 'available' || availability === 'downloadable') {},});});+} else if (availability === 'unavailable') {+ // Language pair or hardware unsupported; execute fallback+ console.warn('Translation model is unavailable on this device.');}```-### 3. Executing Translations+### 2. Executing Translations-The API supports both static and streaming responses.+The API supports both static and streaming responses. Always include download progress monitoring when instantiating the translator.**Standard Translation:**```javascript+// Default to including a progress monitor when creating translatorconst translator = await Translator.create({sourceLanguage: 'en',targetLanguage: 'fr',+ monitor(m) {+ m.addEventListener('downloadprogress', (e) => {+ console.log(`Downloaded ${Math.round(e.loaded * 100)}%`);+ });+ },});const result = await translator.translate(@@ -148,7 +173,7 @@ Before use, check if the `Translator` object is available in the global scope:if ('Translator' in self) {// The Translator API is supported.} else {- // Execute fallback strategy+ // Execute fallback strategy (do not fall back to window.ai.translator).}```@@ -159,4 +184,4 @@ Recommended options:2. **Graceful Degradation**: Visually disable translation control elements or buttons while showing an end-user friendly note (e.g., `"Client-side translation is currently unsupported in this browser"`). Do not allow unhandled exceptions.3. **Polyfill Fallback**: You can use community-maintained polyfills like `built-in-ai-task-apis-polyfills` or `prompt-api-polyfill` to emulate the API surface using remote services.-> **Privacy and Cost Implications:** These polyfills proxy requests to remote servers (such as Gemini API over the cloud). This completely nullifies the on-device privacy guarantees of the native Built-in AI APIs and will incur server-side API usage costs.+> **Privacy and Cost Implications:** These polyfills possibly proxy requests to remote servers (such as Gemini API over the cloud), though local processing is an option, too. Remote processing completely nullifies the on-device privacy guarantees of the native Built-in AI APIs and will often incur server-side API usage costs.diff --git a/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md b/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.mdindex c5cbab2..b3a2dff 100644--- a/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md+++ b/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md@@ -58,9 +58,8 @@ By combining these functions with CSS trigonometry (`sin()`, `cos()`), you can p### Fallback strategies-sibling-count() and sibling-index() has limited availability.-Supported by: Chrome 138 (Jun 2025), Edge 138 (Jun 2025), and Safari 26.2 (Dec 2025).-Unsupported in: Firefox.+Baseline status for sibling-count() and sibling-index(): Newly available. It's been Baseline since 2026-08-18.+Supported by: Chrome 138 (Jun 2025), Edge 138 (Jun 2025), Firefox 154, and Safari 26.2 (Dec 2025).If `sibling-index()` and `sibling-count()` are not supported, provide a fallback by injecting CSS custom properties via JavaScript. **MANDATORY:** Use feature detection with `CSS.supports()` to ensure the script only runs when necessary.diff --git a/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md b/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.mdindex 9764426..f15f0c5 100644--- a/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md+++ b/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md@@ -29,9 +29,8 @@ Use the `sibling-index()` property on the `animation-delay` property so that the## Fallback strategies-sibling-count() and sibling-index() has limited availability.-Supported by: Chrome 138 (Jun 2025), Edge 138 (Jun 2025), and Safari 26.2 (Dec 2025).-Unsupported in: Firefox.+Baseline status for sibling-count() and sibling-index(): Newly available. It's been Baseline since 2026-08-18.+Supported by: Chrome 138 (Jun 2025), Edge 138 (Jun 2025), Firefox 154, and Safari 26.2 (Dec 2025).Test for support for `sibling-index()` using CSS with `@supports (animation-delay: calc(sibling-index() * 0.1s)){}` or JavaScript with `!CSS.supports('animation-delay: calc(sibling-index() * 0.1s)')`.