Skip to main content
C

dsh-google-modern-web-guide

chrischjh/dsh-google-modern-web-guide

Offline GoogleChrome modern-web-guidance for DSH: project `.mwgrc` Baseline policy plus three tools (mwg_search, mwg_retrieve, mwg_legacy_scan) and the modern-web-guidance skill. Under a `limited` target guides skip fallback strategies.

Install

dsh plugin --profile web add github:chrischjh/dsh-google-modern-web-guide

README

Modern web guidance (DSH plugin)

Exposes GoogleChrome/modern-web-guidance — Google's use-case-level web platform guides for coding agents — as three native DSH agent tools plus one agent skill. The corpus is vendored inside the bundle, so search/retrieve/scan run fully offline, per-call latency is ~0.2–0.3 s (no npx cold start), and telemetry is force-disabled (DISABLE_TELEMETRY=1).

Install

git clone https://github.com/chrischjh/dsh-google-modern-web-guide.git
cd dsh-google-modern-web-guide
npm install          # fetches the vendored corpus dependency (modern-web-guidance 1.0.1)

Then Plugin Manager → Add plugin → select this directory (or plugin_manager install_bundle with the absolute directory). From GitHub instead of a checkout, install the bundle spec github:chrischjh/dsh-google-modern-web-guide — the package manager fetches the corpus dependency. Requires DSH >=0.2.0-rc.2 <0.3.0.

Tools

ToolPurposeResult
mwg_searchFind use-case guides; query = 2–5 English action words, one capability, no framework namesUp to 10 {id, description}
mwg_retrieveFetch full guide text by id (comma-separated for several; include discipline hubs like html/css/accessibility)Inline text, or a file path for guides > 9.5 KB (read the file in full)
mwg_legacy_scanDetect legacy web patterns in a directory (~20% of the corpus has deterministic rules)Counts + full JSON report path; verify findings against each rule's keepWhen/dropWhen rubric

The registered modern-web-guidance skill carries the full workflow (query grammar, retrieval batching, compliance check, ### Modern Web Guidance disclosure, framework adaptation rules for React etc.).

Baseline policy

The upstream CLI reads its browser-support target from .mwgrc on disk. This plugin:

  1. Honors a project .mwgrc found by walking up from the session working directory (same walk-up semantics as the CLI), when one exists;
  2. Otherwise writes { "baseline": "limited" } into a plugin scratch directory (<tmp>/dsh-google-modern-web-guide/), because DSH Desktop embeds a Chromium far newer than most guides' Baseline thresholds — guides then instruct agents to skip fallback strategies;
  3. Configure baseline (widely | newly | limited) in the plugin row config to change the default.

Effective-policy banners are injected into retrieved guide text by the CLI itself, so the agent always sees which fallback rules apply.

Provenance

  • Upstream corpus and CLI: npm package modern-web-guidance 1.0.1 (pinned), Apache-2.0 — see LICENSE-MWG. The upstream CLI is spawned unmodified via the running Electron runtime in node mode; no source is patched.
  • This bundle: local development plugin (private, not published). To update the corpus, bump the modern-web-guidance dependency and reinstall the bundle.

Verification status

Verified live on DSH 0.2.2-rc.5 (desktop profile), application: applied:

  • All three tools registered and visible to agents (mwg_search, mwg_retrieve, mwg_legacy_scan), and the modern-web-guidance skill appears in the agent skill catalog.
  • mwg_search "swipeable navigation drawer" → 10 on-topic hits, top navigation-drawer.
  • mwg_retrieve "navigation-drawer" → 21,241-byte guide delivered as a file path (the documented >9.5 KB overflow behavior), with the Project Baseline Target: limited banner injected — proving the scratch .mwgrc fallback works.
  • mwg_legacy_scan on a fixture directory → 2 findings with file:line entries and a full JSON report on disk.
  • Framework-noise query ("close React modal on outside click") still ranked light-dismiss-a-dialog first.

Related plugins