dsh-modern-web-guidance 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +240 -26
- package/README.ru.md +246 -33
- package/README.zh.md +230 -27
- package/client.js +98 -6
- package/index.js +154 -4
- package/lib/report.js +45 -3
- package/lib/scan-rules.js +298 -0
- package/lib/scan.js +561 -0
- package/lib/telemetry.js +55 -8
- package/locale/zh.json +6 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
|
-
208 Baseline-aware guides ·
|
|
13
|
+
208 Baseline-aware guides · 4 tools · 2 skills · zero dependencies · local counters only
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
@@ -27,8 +27,23 @@
|
|
|
27
27
|
<a href="https://www.npmjs.com/package/dsh-modern-web-guidance"><img alt="npm" src="https://img.shields.io/npm/v/dsh-modern-web-guidance"></a>
|
|
28
28
|
<img alt="Guides" src="https://img.shields.io/badge/guides-208-2563eb">
|
|
29
29
|
<img alt="DSH plugin" src="https://img.shields.io/badge/DSH-plugin-0d9488">
|
|
30
|
+
<a href="https://www.npmjs.com/package/dsh-modern-web-guidance"><img alt="npm downloads" src="https://img.shields.io/npm/dm/dsh-modern-web-guidance"></a>
|
|
31
|
+
<a href="https://github.com/metapeka/dsh-modern-web-guidance/releases"><img alt="release" src="https://img.shields.io/github/v/release/metapeka/dsh-modern-web-guidance?label=release"></a>
|
|
30
32
|
</p>
|
|
31
33
|
|
|
34
|
+
<details>
|
|
35
|
+
<summary>📑 Contents</summary>
|
|
36
|
+
|
|
37
|
+
**Start here** · [What you get](#what-you-get) · [Install](#install) · [How to use](#how-to-use) · [Which tool when](#which-tool-when)
|
|
38
|
+
|
|
39
|
+
**Understand it** · [vs Google's package](#vs-google) · [How search works](#how-search-works) · [Catalog map](#catalog-map) · [Experimental guides](#experimental-guides)
|
|
40
|
+
|
|
41
|
+
**Operate it** · [Security and limits](#security-and-limits) · [Usage stats](#usage-stats) · [Sidebar panel](#sidebar-panel) · [Configuration](#configuration) · [Updating the corpus](#updating-the-guide-corpus)
|
|
42
|
+
|
|
43
|
+
**Everything else** · [FAQ](#faq) · [Roadmap](#roadmap) · [Docs map](#docs-map) · [Development](#development) · [Publishing](#publishing) · [License](#attribution-and-license)
|
|
44
|
+
|
|
45
|
+
</details>
|
|
46
|
+
|
|
32
47
|
---
|
|
33
48
|
|
|
34
49
|
Coding models default to legacy web patterns because that is what their training data contains. This plugin puts 208
|
|
@@ -39,20 +54,29 @@ effects, `:has()`, passkeys, `fetchpriority`, …) instead of a JavaScript worka
|
|
|
39
54
|
Everything runs locally: the guides ship inside the package, search is computed in-process, and there are no network
|
|
40
55
|
calls. Usage counters have existed since 0.2.0, but they never leave the machine — see [Usage stats](#usage-stats).
|
|
41
56
|
|
|
42
|
-
|
|
57
|
+
<a id="what-you-get"></a>
|
|
58
|
+
|
|
59
|
+
## 🧰 What you get
|
|
43
60
|
|
|
44
61
|
| Kind | Name | Description |
|
|
45
62
|
|---|---|---|
|
|
46
63
|
| Tool | `web_guidance_search` | Ranked guide ids for a 2–5 word capability query, optional category filter |
|
|
47
64
|
| Tool | `web_guidance_retrieve` | Full markdown for one or more guide ids (max 10 guides / 120k characters per call) |
|
|
48
65
|
| Tool | `web_guidance_list` | Catalog overview: counts per category, or ids/titles for one category |
|
|
66
|
+
| Tool | `web_guidance_legacy_scan` | Regex marker scan of explicit paths for legacy patterns; reports findings, changes nothing |
|
|
49
67
|
| Skill | `modern-web-guidance` | The workflow: search → retrieve → implement → verify → disclose |
|
|
50
68
|
| Skill | `chrome-extensions` | Manifest V3 engineering and Chrome Web Store submission guidance |
|
|
51
69
|
|
|
70
|
+
The scanner is report-only. `web_guidance_legacy_scan` takes `paths` (1–16 files or directories, no default target), an
|
|
71
|
+
optional `rules` list of up to 30 rule ids, and `format: 'summary' | 'json'`; it reads at most 200 files, 512 kB per file
|
|
72
|
+
and 8 MB per call, and returns at most 200 findings.
|
|
73
|
+
|
|
52
74
|
The catalog covers `css`, `ui-atoms`, `ui-components`, `ui-behaviors`, `forms`, `html`, `js`, `accessibility`,
|
|
53
75
|
`visual-design`, `security`, `performance`, `built-in-ai`, `pwa`, `wasm`, `webmcp`, `privacy`, and `user-experience`.
|
|
54
76
|
|
|
55
|
-
|
|
77
|
+
<a id="install"></a>
|
|
78
|
+
|
|
79
|
+
## 🚀 Install
|
|
56
80
|
|
|
57
81
|
Published on npm:
|
|
58
82
|
|
|
@@ -76,11 +100,25 @@ From an agent session, `plugin_manager` with `action: "install_bundle"` and the
|
|
|
76
100
|
does the same thing. The bundle inserts one row (`modern-web-guidance`) and needs no build step, no dependencies, and no
|
|
77
101
|
native modules.
|
|
78
102
|
|
|
79
|
-
|
|
103
|
+
<a id="how-to-use"></a>
|
|
104
|
+
|
|
105
|
+
## 🧭 How to use
|
|
80
106
|
|
|
81
107
|
Nothing has to be wired up: the plugin registers itself, and the `modern-web-guidance` skill tells the agent when to
|
|
82
108
|
reach for it. There are three ways to work with it.
|
|
83
109
|
|
|
110
|
+
<a id="which-tool-when"></a>
|
|
111
|
+
|
|
112
|
+
### Which tool when
|
|
113
|
+
|
|
114
|
+
| You want | Call | Comes back |
|
|
115
|
+
| --- | --- | --- |
|
|
116
|
+
| "how is this done today?" | `web_guidance_search` | ranked guide ids for a 2–5 word capability query, optional category filter |
|
|
117
|
+
| "show me the guide" | `web_guidance_retrieve` | full markdown, up to 10 guides or 120 000 characters per call |
|
|
118
|
+
| "what is even in here?" | `web_guidance_list` | counts per category, or ids and titles for one category |
|
|
119
|
+
| "is the catalog actually being used?" | `/guidance-stats` | the local report as text; `--json` is what the panel reads |
|
|
120
|
+
| "will the code I am about to write or review use a legacy pattern?" | `web_guidance_legacy_scan` | findings for the paths you name explicitly, up to 200 per call |
|
|
121
|
+
|
|
84
122
|
### 1. Just ask for web work (default)
|
|
85
123
|
|
|
86
124
|
The skill's routing description is "search 208 use-case guides before writing HTML, CSS or client-side JavaScript", so
|
|
@@ -132,7 +170,37 @@ ones instead of an empty result.
|
|
|
132
170
|
| Faster LCP | `prioritize hero image` | `fetchpriority` guides |
|
|
133
171
|
| A Manifest V3 extension | (skill) `chrome-extensions` | extension skill references |
|
|
134
172
|
|
|
135
|
-
|
|
173
|
+
<a id="vs-google"></a>
|
|
174
|
+
|
|
175
|
+
## 🆚 vs Google's package
|
|
176
|
+
|
|
177
|
+
This plugin **vendors Google's corpus** — the same 208 guides, byte-identical — and adds the layer
|
|
178
|
+
DeepSeek Harness needs: model-facing tools, a sidebar panel and no runtime dependencies. It does not
|
|
179
|
+
reimplement their agent, and it deliberately drops the engines that would not survive a plugin's size
|
|
180
|
+
and security budget. The honest split:
|
|
181
|
+
|
|
182
|
+
| | Google `modern-web-guidance` | This plugin |
|
|
183
|
+
| --- | --- | --- |
|
|
184
|
+
| Shape | npm package: a CLI plus skills, run as `npx -y modern-web-guidance@latest …` | DSH plugin: 4 tools, 2 skills, a sidebar panel |
|
|
185
|
+
| Audience | any agent that can run a shell command | DeepSeek Harness sessions |
|
|
186
|
+
| Guide corpus | 208 indexed guides (209 `.md` files, one byte-identical duplicate) | the same 208, byte-identical, snapshot `2026_11_09-5bcc021b` |
|
|
187
|
+
| Lookup | precomputed assets in `gen/` — quantized word vectors (`query-words.i8`, 7.47 MB) and chunk embeddings, 9.16 MB together | BM25 built in-process from `guides.json` and the guide bodies: no assets, no model download (measured 29/30 top-1 on a 30-query probe) |
|
|
188
|
+
| Runtime dependencies | Node plus the CLI engines shipped in the package | none |
|
|
189
|
+
| Network | `npx` fetches the package, then works locally | never — the corpus is inside the package |
|
|
190
|
+
| Legacy scan | a 4.99 MB `legacy-scan` engine with a four-step scan → verify → report → modernize workflow | shipped in 0.5.0: a dependency-free regex scanner over 30 rules, explicit paths only, report only |
|
|
191
|
+
| Experimental guides | gated inside the CLI | `[experimental]` marker in `web_guidance_search`, warning banner in `web_guidance_retrieve` |
|
|
192
|
+
| Usage insight | none | local counters, `/guidance-stats`, and the sidebar panel |
|
|
193
|
+
| Languages | English guides | the same guides; docs in EN/RU/ZH, panel in EN/RU/ZH |
|
|
194
|
+
| Size | — | 256 files, 873 kB packed, 2.5 MB unpacked |
|
|
195
|
+
|
|
196
|
+
What this means in practice: if you work outside DeepSeek Harness, use their package — it is the
|
|
197
|
+
reference implementation and it owns the corpus. Inside Harness you want the tools in the model's tool
|
|
198
|
+
list, an install with no build step and no network, and a panel that says whether the guides are being
|
|
199
|
+
used; that is this plugin.
|
|
200
|
+
|
|
201
|
+
<a id="how-search-works"></a>
|
|
202
|
+
|
|
203
|
+
## 🧠 How search works
|
|
136
204
|
|
|
137
205
|
`lib/guidance.js` builds a BM25 index over the bundled corpus at first use (~1.9 MB of markdown, indexed in a few
|
|
138
206
|
hundred milliseconds and cached): title, id, description, `featuresUsed`, headings and body, with stopword filtering,
|
|
@@ -143,21 +211,80 @@ Compared with the upstream semantic search, phrase-like queries (`"light dismiss
|
|
|
143
211
|
the specific guide first; broad topical queries can differ in ordering. If a search misses, `web_guidance_list` shows
|
|
144
212
|
what the catalog contains.
|
|
145
213
|
|
|
146
|
-
|
|
214
|
+
<a id="catalog-map"></a>
|
|
215
|
+
|
|
216
|
+
## 🗺 Catalog map
|
|
217
|
+
|
|
218
|
+
Everything is local, so the catalog is only as useful as the agent's ability to find the right guide.
|
|
219
|
+
`web_guidance_list` prints these counts at runtime; this is what they look like at snapshot
|
|
220
|
+
`2026_11_09-5bcc021b`.
|
|
221
|
+
|
|
222
|
+
<details>
|
|
223
|
+
<summary>Counts per category (208 guides, 17 categories)</summary>
|
|
224
|
+
|
|
225
|
+
| Category | Guides | Category | Guides |
|
|
226
|
+
| --- | --- | --- | --- |
|
|
227
|
+
| `ui-behaviors` | 40 | `html` | 8 |
|
|
228
|
+
| `performance` | 26 | `js` | 5 |
|
|
229
|
+
| `ui-components` | 22 | `accessibility` | 4 |
|
|
230
|
+
| `visual-design` | 22 | `built-in-ai` | 4 |
|
|
231
|
+
| `forms` | 19 | `user-experience` | 3 |
|
|
232
|
+
| `css` | 18 | `webmcp` | 3 |
|
|
233
|
+
| `security` | 17 | `pwa` | 2 |
|
|
234
|
+
| `ui-atoms` | 13 | `privacy` · `wasm` | 1 · 1 |
|
|
235
|
+
| | | **total** | **208** |
|
|
236
|
+
|
|
237
|
+
</details>
|
|
238
|
+
|
|
239
|
+
<a id="experimental-guides"></a>
|
|
240
|
+
|
|
241
|
+
## 🧪 Experimental guides
|
|
242
|
+
|
|
243
|
+
Eighteen of the 208 guides describe platform features that are not safe to assume: eight sit behind an
|
|
244
|
+
Origin Trial in Chrome, and ten are volatile in a single engine. Upstream flags them in its index; this
|
|
245
|
+
plugin surfaces the flag where the agent will actually see it:
|
|
246
|
+
|
|
247
|
+
- `web_guidance_search` appends `[experimental]` to the hit;
|
|
248
|
+
- `web_guidance_retrieve` opens the guide with a `> [!WARNING]` banner naming the reason;
|
|
249
|
+
- the guide body itself is untouched — byte-identical to upstream — and the banner counts against the
|
|
250
|
+
120 000-character budget, not against the 10-guide limit.
|
|
251
|
+
|
|
252
|
+
<details>
|
|
253
|
+
<summary>The 18 flagged guides</summary>
|
|
254
|
+
|
|
255
|
+
**Origin Trial (8)** — the feature ships behind a trial token: `verify-email-ownership`,
|
|
256
|
+
`apply-webgl-shaders`, `export-html-media-from-canvas`, `expose-canvas-content-to-browser-features`,
|
|
257
|
+
`interactive-content-in-3d-scenes`, `agentic-forms`, `agentic-javascript-tools`, `webmcp`.
|
|
258
|
+
|
|
259
|
+
**Volatile in one engine (10)** — one engine implements it, or the API is still moving:
|
|
260
|
+
`language-detection`, `language-model`, `summarizer`, `translator`, `out-of-order-html-streaming`,
|
|
261
|
+
`client-side-encryption`, `digital-signatures`, `restrict-outbound-connections`, `2d-panning`,
|
|
262
|
+
`custom-text-decorations`.
|
|
263
|
+
|
|
264
|
+
</details>
|
|
265
|
+
|
|
266
|
+
Treat a flagged guide as "the shape of the solution, not a guarantee". Feature-detect what it
|
|
267
|
+
describes, and tell the user which part is behind a flag before shipping it.
|
|
268
|
+
|
|
269
|
+
<a id="skills"></a>
|
|
270
|
+
|
|
271
|
+
## 🪄 Skills
|
|
147
272
|
|
|
148
273
|
The `modern-web-guidance` skill body is adapted from upstream: it tells the agent to call this plugin's tools instead
|
|
149
274
|
of the `npx` CLI, keeps the framework/SSR/DOM notes and the Baseline fallback policy, drops the CLI and telemetry
|
|
150
275
|
sections, and states the trust boundary — retrieved guides are reference material, not instructions. The
|
|
151
276
|
`chrome-extensions` skill is bundled unchanged and loads its `references/` files from the skill directory.
|
|
152
277
|
|
|
153
|
-
|
|
278
|
+
<a id="security-and-limits"></a>
|
|
279
|
+
|
|
280
|
+
## 🛡 Security and limits
|
|
154
281
|
|
|
155
282
|
The corpus is third-party text that ends up in a model's context, and tool arguments come from that model, so both
|
|
156
283
|
sides are bounded:
|
|
157
284
|
|
|
158
|
-
- **No network, no execution, one local write.** The plugin imports only local `node:fs`, `node:
|
|
159
|
-
has no dependencies and no lifecycle scripts, so nothing is fetched or run at install
|
|
160
|
-
its own counters file (see [Usage stats](#usage-stats)).
|
|
285
|
+
- **No network, no execution, one local write.** The plugin imports only local `node:fs`, `node:fs/promises`, `node:path`,
|
|
286
|
+
`node:url` and `node:buffer`; it has no dependencies and no lifecycle scripts, so nothing is fetched or run at install
|
|
287
|
+
time. The only file it writes is its own counters file (see [Usage stats](#usage-stats)).
|
|
161
288
|
- **Guides cannot smuggle commands.** Upstream's guide bodies cross-reference each other with
|
|
162
289
|
`npx -y modern-web-guidance@latest retrieve "…"` (197 occurrences in 64 guides). Those references are rewritten to
|
|
163
290
|
`web_guidance_retrieve({"ids":["…"]})` when the index loads, so nothing a model reads from the catalog asks it to
|
|
@@ -167,18 +294,25 @@ sides are bounded:
|
|
|
167
294
|
Retrieving all 208 guides would hand back 1.9 MB (~475k tokens) in one result.
|
|
168
295
|
- **`web_guidance_search` is bounded**: the query is capped at 512 characters and 24 distinct terms before the lexical
|
|
169
296
|
scan. A 137 KB query used to block the host's event loop for seconds; the same shape now costs milliseconds.
|
|
297
|
+
- **The scanner reads only what it is given.** `web_guidance_legacy_scan` has no default target: the caller names 1–16
|
|
298
|
+
paths, each must resolve inside the session workspace, and a symlink that escapes it is skipped rather than followed.
|
|
299
|
+
It refuses absolute paths, paths outside the workspace and missing paths (`path-absolute`, `path-outside`,
|
|
300
|
+
`path-missing`), caps the read at 200 files, 512 kB per file and 8 MB per call, and never writes a byte.
|
|
170
301
|
- **The catalog cannot reach outside the package**: entry ids and categories must be slugs, and every resolved path is
|
|
171
302
|
checked to stay inside the data directory. A tampered `guides.json` used to be able to read any `*.md` on disk.
|
|
172
303
|
- **Failures retry and stay opaque**: a transient read error no longer poisons the tool for the session, and tool errors
|
|
173
304
|
no longer disclose absolute install paths.
|
|
174
305
|
|
|
175
|
-
|
|
306
|
+
These properties are covered by `test/hardening.test.mjs`, which fails on the pre-hardening code, and by
|
|
307
|
+
`test/scan-core.test.mjs` for the scanner's containment and caps. The full audit — three
|
|
176
308
|
reports plus runnable repros — lives in [`audit/`](audit/), and the repro scripts under `audit/repro/` exit non-zero
|
|
177
309
|
while a defect is live.
|
|
178
310
|
|
|
179
|
-
|
|
311
|
+
<a id="usage-stats"></a>
|
|
180
312
|
|
|
181
|
-
|
|
313
|
+
## 📊 Usage stats
|
|
314
|
+
|
|
315
|
+
Since 0.2.0 the plugin records what the four tools are actually asked for. The counters are local: no endpoint, no
|
|
182
316
|
analytics service, no third-party SDK, and nothing leaves the machine.
|
|
183
317
|
|
|
184
318
|
The report is a human slash command, not a tool the agent can call:
|
|
@@ -194,35 +328,44 @@ The report is a human slash command, not a tool the agent can call:
|
|
|
194
328
|
counts, per-category hit counts, per-guide retrieve counts, and the last 1000 calls with their query text and returned
|
|
195
329
|
ids. Misses are the point — a count of misses that cannot be reproduced cannot be fixed.
|
|
196
330
|
|
|
331
|
+
0.5.0 adds a fourth row (`legacy-scan`) and a findings total to the same report.
|
|
332
|
+
|
|
197
333
|
Where it lives: the profile's durable storage, the same trust boundary that already holds session logs. Retention
|
|
198
334
|
defaults to 90 days, and `--reset --yes` erases it.
|
|
199
335
|
|
|
200
336
|
Turn it off: set `enabled: false` in the plugin config — no listener is registered and no file is written.
|
|
201
337
|
|
|
202
|
-
|
|
338
|
+
<a id="sidebar-panel"></a>
|
|
339
|
+
|
|
340
|
+
## 🖥 Sidebar panel
|
|
203
341
|
|
|
204
342
|
The plugin adds a client half: a guidance icon in the left rail opens **Guidance Insights** in the central area. It
|
|
205
|
-
shows the same counters `/guidance-stats` prints
|
|
343
|
+
shows the same counters `/guidance-stats` prints — four tools plus the finding total — as a view:
|
|
206
344
|
|
|
207
345
|
- total calls and hit rate for the last 7 days
|
|
208
346
|
- the most frequent queries, with hit and miss counts
|
|
209
347
|
- category coverage — retrieved guides against the 208 in the corpus
|
|
210
348
|
- the queries that found nothing
|
|
211
349
|
- how many guides were never retrieved
|
|
350
|
+
- the scanner's finding total for the same window
|
|
212
351
|
|
|
213
352
|
A single refresh control re-reads the counters; there is nothing else to press.
|
|
214
353
|
|
|
215
354
|
The panel is read-only. It never changes a counter, never leaves the machine, and adds no network calls and no new
|
|
216
|
-
tools — the same
|
|
355
|
+
tools — the same four tools stay exactly four. `/guidance-stats` remains the text and `--json` version for the
|
|
217
356
|
terminal and for the agent; the panel is that report as a view.
|
|
218
357
|
|
|
219
|
-
|
|
358
|
+
<a id="configuration"></a>
|
|
359
|
+
|
|
360
|
+
## ⚙️ Configuration
|
|
220
361
|
|
|
221
362
|
The plugin needs no configuration to work. It registers its tools and skills on the host context and is inert when the
|
|
222
363
|
profile has no `tools` or `skills` service. The one setting is `enabled` on the plugin row: `false` turns the local
|
|
223
364
|
counters off (see [Usage stats](#usage-stats)).
|
|
224
365
|
|
|
225
|
-
|
|
366
|
+
<a id="updating-the-guide-corpus"></a>
|
|
367
|
+
|
|
368
|
+
## 🔄 Updating the guide corpus
|
|
226
369
|
|
|
227
370
|
The corpus is a pinned snapshot of upstream `modern-web-guidance@1.0.0`
|
|
228
371
|
(skill version `2026_11_09-5bcc021b`). To refresh it:
|
|
@@ -238,24 +381,95 @@ The corpus is a pinned snapshot of upstream `modern-web-guidance@1.0.0`
|
|
|
238
381
|
any served guide tells the agent to run the upstream CLI, so a refreshed corpus needs no manual de-CLI pass — the
|
|
239
382
|
rewrite happens at load time (`lib/guidance.js`, `CLI_REFERENCE`).
|
|
240
383
|
|
|
241
|
-
|
|
384
|
+
<a id="faq"></a>
|
|
385
|
+
|
|
386
|
+
## ❓ FAQ
|
|
387
|
+
|
|
388
|
+
**The plugin is installed but I see nothing.** The bundle inserts one row (`modern-web-guidance`) and
|
|
389
|
+
needs no build step. Restart DSH after `dsh plugin --profile desktop add …`; the tools appear in the
|
|
390
|
+
next session's tool list, and the panel as an icon in the left rail.
|
|
391
|
+
|
|
392
|
+
**Search returns nothing useful.** Queries are 2–5 words describing a capability ("light dismiss
|
|
393
|
+
dialog", "view transition", "container query"), not sentences. If a query still misses, call
|
|
394
|
+
`web_guidance_list` for the category overview and retrieve by id from there.
|
|
395
|
+
|
|
396
|
+
**Why did a result say `[experimental]`?** The guide's platform feature is behind an Origin Trial or
|
|
397
|
+
is volatile in one engine — see [Experimental guides](#experimental-guides). The guide is still the
|
|
398
|
+
right shape; feature-detect it before shipping.
|
|
399
|
+
|
|
400
|
+
**What can the legacy scanner actually do?** It is a regex marker scan, not a parser: 30 rules matched
|
|
401
|
+
line by line, covering 30 of the 208 guides (14.4 %), with no AST, no data-flow analysis and no autofix —
|
|
402
|
+
it reports and stops. It makes no parity claim with Chrome's own `legacy-scan`, a 4.99 MB engine with a
|
|
403
|
+
bundled TypeScript compiler; this one is a dependency-free pass that can produce false positives and
|
|
404
|
+
misses, so treat a finding as a lead to verify, not as a verdict.
|
|
405
|
+
|
|
406
|
+
**Does anything leave my machine?** No. The corpus is inside the package, search is computed
|
|
407
|
+
in-process, and there are no network calls. The usage counters are local files and can be switched off
|
|
408
|
+
with `enabled: false` — see [Security and limits](#security-and-limits) and [ADR 0001](docs/adr/0001-local-telemetry.md).
|
|
409
|
+
|
|
410
|
+
**Google says 203 use cases. Why does this say 208?** Upstream's own count is 203 *use-case* guides;
|
|
411
|
+
the index has 208 entries, the extra five being the discipline overviews (`accessibility`, `forms`,
|
|
412
|
+
`html`, `performance`, `security`). This plugin ships what the index ships.
|
|
413
|
+
|
|
414
|
+
**Which DSH versions work?** `engines.dsh` is `>=0.2.0-rc.1 <0.3.0-0` and Node `>=22.19.0`. The tools
|
|
415
|
+
work on their own; the panel additionally needs the host's `slots`, `locale` and `remote` services.
|
|
416
|
+
|
|
417
|
+
<a id="roadmap"></a>
|
|
418
|
+
|
|
419
|
+
## 🚦 Roadmap
|
|
420
|
+
|
|
421
|
+
| Release | State | What it is |
|
|
422
|
+
| --- | --- | --- |
|
|
423
|
+
| 0.4.0 | shipped | the upstream v1.0.0 corpus (208 guides) plus experimental marking |
|
|
424
|
+
| 0.4.1 | shipped | docs: navigation, the comparison, the catalog map |
|
|
425
|
+
| 0.5.0 | this release | `legacy-scan` as the fourth tool: 30 regex rules, explicit paths only, report only — `web_guidance_legacy_scan`, with a fourth counter and a findings total in the panel. Design and verdict: [docs/notes/legacy-scan-feasibility.md](docs/notes/legacy-scan-feasibility.md) |
|
|
426
|
+
|
|
427
|
+
Deliberately **not** planned: shipping upstream's 9.16 MB embedding tables, or its 4.99 MB
|
|
428
|
+
`legacy-scan` engine with a bundled TypeScript compiler. Both would break "zero runtime dependencies,
|
|
429
|
+
no network, no code generation" for a gain the lexical index does not show.
|
|
430
|
+
|
|
431
|
+
<a id="docs-map"></a>
|
|
432
|
+
|
|
433
|
+
## 📚 Docs map
|
|
434
|
+
|
|
435
|
+
| Document | Read it when |
|
|
436
|
+
| --- | --- |
|
|
437
|
+
| [`docs/README.md`](docs/README.md) | you want the full map of this repository |
|
|
438
|
+
| [`PUBLISHING.md`](PUBLISHING.md) | you are releasing: npm rules, trusted publishing, the release ritual |
|
|
439
|
+
| [`docs/releases/README.md`](docs/releases/README.md) | you are writing release notes — the house style lives here |
|
|
440
|
+
| [`AGENTS.md`](AGENTS.md) | you are an agent working in this repo: CI, client half, conventions |
|
|
441
|
+
| [`GLOSSARY.md`](GLOSSARY.md) | a term in this codebase is unclear |
|
|
442
|
+
| [`NOTICE`](NOTICE) | attribution: what came from upstream and what was left out, and why |
|
|
443
|
+
| [`audit/`](audit) | you want the 0.1.x security, corpus and bug audits as they were written |
|
|
444
|
+
| [`docs/adr/`](docs/adr) | you want the decisions: local telemetry, and what followed |
|
|
445
|
+
| [`docs/notes/`](docs/notes) | you want the research behind a release (upstream diffs, feasibility studies, plans) |
|
|
446
|
+
| [`docs/notes/legacy-scan-feasibility.md`](docs/notes/legacy-scan-feasibility.md) | you want the analysis behind `legacy-scan`: what upstream's engine does, what a regex scan can match, and the verdict |
|
|
447
|
+
|
|
448
|
+
<a id="development"></a>
|
|
449
|
+
|
|
450
|
+
## 🧑💻 Development
|
|
242
451
|
|
|
243
452
|
```shell
|
|
244
453
|
npm test
|
|
245
454
|
```
|
|
246
455
|
|
|
247
|
-
|
|
248
|
-
`plugin.test.mjs`
|
|
249
|
-
|
|
250
|
-
`
|
|
251
|
-
|
|
456
|
+
`npm test` runs 150 tests across twelve files: `guidance.test.mjs` covers the index, ranking, retrieval and the stemmer;
|
|
457
|
+
`plugin.test.mjs` mounts the plugin against a fake Cordis context; `hardening.test.mjs` guards the security invariants;
|
|
458
|
+
`report.test.mjs`, `stats.test.mjs`, `store.test.mjs` and `telemetry.test.mjs` cover the counter pipeline;
|
|
459
|
+
`scan-core.test.mjs`, `scan-rules.test.mjs` and `scan-tool.test.mjs` cover the scanner's containment, its rule table and
|
|
460
|
+
the tool contract, and `scan.test.mjs` is the end-to-end scan; `client-locales.test.mjs` keeps the panel's three
|
|
461
|
+
dictionaries in sync. In a sandbox that forbids child processes, run the files directly (`node test/hardening.test.mjs`).
|
|
462
|
+
|
|
463
|
+
<a id="publishing"></a>
|
|
252
464
|
|
|
253
|
-
## Publishing
|
|
465
|
+
## 📦 Publishing
|
|
254
466
|
|
|
255
467
|
Marketplace submission and npm steps are documented in [PUBLISHING.md](PUBLISHING.md); the prepared awesome-dsh-plugin
|
|
256
468
|
entry lives in [`market/awesome-dsh-plugin.yml`](market/awesome-dsh-plugin.yml).
|
|
257
469
|
|
|
258
|
-
|
|
470
|
+
<a id="attribution-and-license"></a>
|
|
471
|
+
|
|
472
|
+
## ⚖️ Attribution and license
|
|
259
473
|
|
|
260
474
|
Apache-2.0. The guide corpus, the `chrome-extensions` skill, and the source of the adapted `SKILL.md` come from
|
|
261
475
|
[GoogleChrome/modern-web-guidance](https://github.com/GoogleChrome/modern-web-guidance) (Copyright Google LLC,
|