@adia-ai/adia-ui-forge 0.8.62 → 0.8.63
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/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +3 -3
- package/CHANGELOG.md +300 -275
- package/README.md +54 -18
- package/__init__.py +8 -8
- package/agents/a2ui-maintenance-agent.corpus.json +7 -7
- package/agents/a2ui-maintenance-agent.md +6 -6
- package/agents/a2ui-planner-agent.md +11 -11
- package/agents/demo-audit-agent.corpus.json +4 -4
- package/agents/demo-audit-agent.md +8 -9
- package/agents/framework-checker.md +10 -11
- package/agents/framework-planner-agent.md +9 -10
- package/agents/gen-ui-review-agent.corpus.json +4 -4
- package/agents/gen-ui-review-agent.md +8 -8
- package/agents/package-release-agent.corpus.json +4 -4
- package/agents/package-release-agent.md +9 -10
- package/agents/primitive-authoring-agent.corpus.json +1 -1
- package/agents/primitive-authoring-agent.md +5 -5
- package/agents/routing-corpus.json +46 -46
- package/codex.interface.json +1 -1
- package/commands/gen-ui-review.md +1 -1
- package/commands/package-release.md +2 -2
- package/package.json +1 -1
- package/plugin.yaml +2 -2
- package/prompts/gen-ui-review.md +1 -1
- package/prompts/package-release.md +2 -2
- package/references/contracts/a2ui-mcp-surface.md +7 -7
- package/references/contracts/migration-guide-format.md +6 -7
- package/references/shared/content-trust.md +3 -5
- package/skills/a2ui-maintenance/SKILL.md +13 -16
- package/skills/a2ui-maintenance/evals/evals.json +2 -2
- package/skills/a2ui-maintenance/evals/routing-corpus.json +1 -1
- package/skills/a2ui-maintenance/references/anti-patterns.md +10 -10
- package/skills/a2ui-maintenance/references/chunk-authoring.md +11 -12
- package/skills/a2ui-maintenance/references/corpus-discipline.md +13 -14
- package/skills/a2ui-maintenance/references/data-model-reactivity.md +22 -25
- package/skills/a2ui-maintenance/references/eval-diagnostics.md +21 -21
- package/skills/a2ui-maintenance/references/format-extension-decisions.md +12 -13
- package/skills/a2ui-maintenance/references/leverage-rules.md +6 -6
- package/skills/a2ui-maintenance/references/mcp-pipeline-ops.md +9 -10
- package/skills/a2ui-maintenance/references/mcp-tool-reference.md +11 -12
- package/skills/a2ui-maintenance/references/pipeline-overview.md +33 -38
- package/skills/a2ui-maintenance/references/semantic-fail-lifting.md +13 -14
- package/skills/a2ui-maintenance/references/strategy-engines.md +14 -16
- package/skills/a2ui-maintenance/references/surface-lifecycle.md +10 -11
- package/skills/a2ui-maintenance/references/zettel-calibration.md +14 -16
- package/skills/component-md-authoring/SKILL.md +20 -21
- package/skills/component-md-authoring/agents/openai.yaml +1 -1
- package/skills/cross-harness-authoring-standards/SKILL.md +19 -21
- package/skills/cross-harness-authoring-standards/agents/openai.yaml +1 -1
- package/skills/cross-harness-compatibility-standards/SKILL.md +34 -35
- package/skills/cross-harness-compatibility-standards/agents/openai.yaml +1 -1
- package/skills/demo-audit/SKILL.md +38 -38
- package/skills/demo-audit/evals/routing-corpus.json +1 -1
- package/skills/demo-audit/references/admin-shell-anatomy.md +21 -25
- package/skills/demo-audit/references/app-shell-pitfalls.md +11 -13
- package/skills/demo-audit/references/auto-fix-allowlist.md +3 -3
- package/skills/demo-audit/references/card-anatomy-sweep.md +10 -11
- package/skills/demo-audit/references/chat-shell-anatomy.md +25 -26
- package/skills/demo-audit/references/editor-shell-anatomy.md +25 -28
- package/skills/demo-audit/references/html-attr-sweep.md +12 -13
- package/skills/demo-audit/references/mode7-status-battery.md +4 -4
- package/skills/demo-audit/references/native-leak-annotations.md +8 -8
- package/skills/demo-audit/references/output-contract-worked-example.md +8 -8
- package/skills/demo-audit/references/probe-discipline-and-escalation.md +2 -2
- package/skills/demo-audit/references/visual-probe-triage.md +21 -23
- package/skills/gen-ui-review/SKILL.md +27 -27
- package/skills/gen-ui-review/agents/openai.yaml +1 -1
- package/skills/gen-ui-review/evals/routing-corpus.json +1 -1
- package/skills/gen-ui-review/references/corpus-html-patterns.md +28 -29
- package/skills/gen-ui-review/references/exit-gate-mechanics.md +5 -5
- package/skills/gen-ui-review/references/lookup-maintenance.md +2 -2
- package/skills/gen-ui-review/references/loop-protocol.md +25 -25
- package/skills/gen-ui-review/references/rubric-cosmetic.md +10 -10
- package/skills/gen-ui-review/references/rubric-decompose.md +15 -16
- package/skills/gen-ui-review/references/rubric-score.md +23 -24
- package/skills/gen-ui-review/references/scorecard-worked-examples.md +12 -12
- package/skills/gen-ui-review/references/scores.schema.json +2 -2
- package/skills/llm-client-maintenance/SKILL.md +12 -12
- package/skills/llm-client-maintenance/evals/routing-corpus.json +1 -1
- package/skills/llm-client-maintenance/references/adapter-contract.md +27 -27
- package/skills/llm-client-maintenance/references/add-a-provider.md +25 -25
- package/skills/llm-client-maintenance/references/bridge-facade.md +31 -31
- package/skills/llm-client-maintenance/references/browser-proxy-boundary.md +17 -17
- package/skills/llm-client-maintenance/references/model-registry.md +14 -14
- package/skills/llm-client-maintenance/references/streaming-sse.md +21 -21
- package/skills/package-release/SKILL.md +21 -23
- package/skills/package-release/evals/evals.json +2 -2
- package/skills/package-release/evals/routing-corpus.json +2 -2
- package/skills/package-release/references/authorization-model.md +6 -8
- package/skills/package-release/references/changelog-discipline.md +25 -27
- package/skills/package-release/references/cut-procedure.md +129 -136
- package/skills/package-release/references/gates-catalog.md +42 -43
- package/skills/package-release/references/independent-package-release.md +14 -15
- package/skills/package-release/references/invariants-detail.md +9 -9
- package/skills/package-release/references/mechanization.md +11 -12
- package/skills/package-release/references/migration-guide-authoring.md +20 -20
- package/skills/package-release/references/notes-authoring.md +20 -20
- package/skills/package-release/references/recovery-paths.md +28 -28
- package/skills/primitive-authoring/SKILL.md +19 -19
- package/skills/primitive-authoring/agents/openai.yaml +1 -1
- package/skills/primitive-authoring/evals/evals.json +2 -2
- package/skills/primitive-authoring/evals/routing-corpus.json +2 -2
- package/skills/primitive-authoring/references/INDEX.md +22 -22
- package/skills/primitive-authoring/references/anti-patterns.md +76 -77
- package/skills/primitive-authoring/references/api-contract.md +63 -65
- package/skills/primitive-authoring/references/authoring-cycle.md +47 -50
- package/skills/primitive-authoring/references/canonical-pattern-index.md +118 -118
- package/skills/primitive-authoring/references/code-style.md +50 -52
- package/skills/primitive-authoring/references/common-gotchas.md +23 -23
- package/skills/primitive-authoring/references/composite-demo-protocol.md +42 -45
- package/skills/primitive-authoring/references/css-patterns.md +97 -97
- package/skills/primitive-authoring/references/for-attribute-event-contract.md +12 -12
- package/skills/primitive-authoring/references/form-control-sizing.md +16 -18
- package/skills/primitive-authoring/references/lifecycle-patterns.md +42 -42
- package/skills/primitive-authoring/references/llm-bridge.md +21 -21
- package/skills/primitive-authoring/references/module-promotion.md +51 -51
- package/skills/primitive-authoring/references/primitive-audit.md +16 -16
- package/skills/primitive-authoring/references/shell-patterns.md +81 -81
- package/skills/primitive-authoring/references/svg-authoring.md +62 -66
- package/skills/primitive-authoring/references/token-contract.md +45 -49
- package/skills/primitive-authoring/references/trait-pages.md +8 -8
- package/skills/primitive-authoring/references/worked-example.md +39 -39
- package/skills/primitive-authoring/references/yaml-contract.md +139 -143
- package/skills/site-deployment/SKILL.md +25 -26
- package/skills/site-deployment/agents/openai.yaml +1 -1
- package/skills/site-deployment/evals/routing-corpus.json +1 -1
- package/skills/site-deployment/references/deploy-playbooks.md +51 -53
- package/skills/site-docs-authoring/SKILL.md +14 -14
- package/skills/site-docs-authoring/agents/openai.yaml +1 -1
- package/skills/site-docs-authoring/evals/evals.json +1 -1
- package/skills/site-docs-authoring/evals/routing-corpus.json +1 -1
- package/skills/site-docs-authoring/intent.md +18 -18
- package/skills/ssr-compatibility/SKILL.md +24 -25
- package/skills/ssr-compatibility/agents/openai.yaml +1 -1
- package/skills/ssr-compatibility/evals/evals.json +1 -1
- package/skills/ssr-compatibility/evals/routing-corpus.json +1 -1
- package/skills/ssr-compatibility/references/consumer-workarounds.md +22 -23
- package/skills/ssr-compatibility/references/failure-shapes.md +84 -91
- package/skills/ssr-compatibility/references/guard-patterns.md +54 -58
- package/skills/ssr-compatibility/references/status-ledger.md +17 -17
- package/skills/ssr-compatibility/references/test-without-linkedom.md +26 -27
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"version": "2.1.0",
|
|
5
5
|
"purpose": "Routing-eval corpus for demo-audit. Each phrase declares the skill (expected), a forbidden skill (expected_not, for phrases the source data only ever asserted as \"not this skill\"), or neither. Scored by scripts/skills/run-skill-evals.mjs (TF-IDF token overlap over per-skill description+triggers).",
|
|
6
6
|
"scoring_notes": "Heuristic signal, not ground truth. Treat misroutes as a prompt to tighten the skill description, never as a reason to keyword-stuff it. Real harness routing is LLM-driven.",
|
|
7
|
-
"scope": "demo-audit routing
|
|
7
|
+
"scope": "demo-audit routing, does this phrase activate demo-audit?",
|
|
8
8
|
"phrases": [
|
|
9
9
|
{
|
|
10
10
|
"id": "demo-audit-pos-01",
|
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
# Mode 5
|
|
1
|
+
# Mode 5, Admin-shell composition: the 13 canonical parts
|
|
2
2
|
|
|
3
3
|
Script: `scripts/dev/audit-shell-composition.mjs` (repo-local), npm gates
|
|
4
4
|
`audit:shell-composition{,:strict,:all}`. Static AST walk over
|
|
5
|
-
`apps/**/*.html`, `playgrounds/**/*.html`, `catalog/page-shells/**/*.html`
|
|
6
|
-
|
|
7
|
-
mechanical census — it has grown past this list (count it in
|
|
5
|
+
`apps/**/*.html`, `playgrounds/**/*.html`, `catalog/page-shells/**/*.html`, no browser needed; pre-commit fast. The script's own `PARTS` array is the
|
|
6
|
+
mechanical census, it has grown past this list (count it in
|
|
8
7
|
`scripts/dev/audit-shell-composition.mjs`, never from a hand-typed number
|
|
9
8
|
here); this numbered list is the human review standard, and the findings
|
|
10
9
|
table below samples common symptoms rather than the script's full roster.
|
|
11
|
-
Canonical source: the monorepo's `site/index.html
|
|
10
|
+
Canonical source: the monorepo's `site/index.html`, the markup that renders
|
|
12
11
|
the live admin-dashboard example.
|
|
13
12
|
|
|
14
13
|
1. `<admin-shell mode="rounded borderless">` outer (canonical mode attr)
|
|
15
14
|
2. `<admin-sidebar slot="leading" resizable collapsible>` (left rail)
|
|
16
15
|
3. Sidebar `<admin-topbar slot="header">` with
|
|
17
|
-
`<select-ui avatar="…" value="…" variant="ghost">` context switcher
|
|
18
|
-
|
|
19
|
-
4. Sidebar nav wrap around `<nav-ui>` — `<section>` (per the examples),
|
|
16
|
+
`<select-ui avatar="…" value="…" variant="ghost">` context switcher, NOT `<menu-ui>` (legacy pattern), ★ commonly mis-implemented
|
|
17
|
+
4. Sidebar nav wrap around `<nav-ui>`, `<section>` (per the examples),
|
|
20
18
|
`<section-ui>` (card-style chrome), or `<page-scroll>` all accepted;
|
|
21
19
|
a bare `<nav-ui>` direct child overflows long lists
|
|
22
20
|
5. Sidebar `<admin-statusbar slot="footer">` with `<select-ui avatar="…">`
|
|
23
|
-
(user menu)
|
|
24
|
-
6. Sidebar `<div data-sidebar-resize></div
|
|
21
|
+
(user menu), ★ commonly missing
|
|
22
|
+
6. Sidebar `<div data-sidebar-resize></div>`, REQUIRED when `resizable` is on
|
|
25
23
|
7. `<admin-content>` inner `<admin-topbar>` containing
|
|
26
24
|
`<button-ui data-sidebar-toggle="leading" icon="sidebar">` +
|
|
27
|
-
`<breadcrumb-ui>` + `<span data-spacer>` + `<div data-actions
|
|
28
|
-
★ spacer + actions commonly missing
|
|
25
|
+
`<breadcrumb-ui>` + `<span data-spacer>` + `<div data-actions>`, ★ spacer + actions commonly missing
|
|
29
26
|
8. `[data-actions]` contains `<popover-ui>` + `<theme-panel slot="content">`
|
|
30
27
|
(there is no `<theme-picker-ui>`)
|
|
31
28
|
9. `<page-scroll>` wrapping optional `<aside data-subnav hidden>` +
|
|
@@ -45,31 +42,30 @@ the live admin-dashboard example.
|
|
|
45
42
|
wrapping `page-ui[band]`). This item is kept only so this anatomy
|
|
46
43
|
still recognizes the retired shape when auditing legacy surfaces
|
|
47
44
|
that predate the migration; never author it in new surfaces.
|
|
48
|
-
11. `<admin-statusbar>` at content footer (version strip)
|
|
45
|
+
11. `<admin-statusbar>` at content footer (version strip), ★ commonly missing
|
|
49
46
|
12. Second `<admin-sidebar slot="trailing">` (inspector rail, hidden by
|
|
50
|
-
default)
|
|
51
|
-
13. `<admin-command>` with `<command-ui>` (cmd-K palette, top-level child)
|
|
52
|
-
strongly recommended
|
|
47
|
+
default), strongly recommended
|
|
48
|
+
13. `<admin-command>` with `<command-ui>` (cmd-K palette, top-level child), strongly recommended
|
|
53
49
|
|
|
54
50
|
## Severity mapping
|
|
55
51
|
|
|
56
|
-
- **critical
|
|
52
|
+
- **critical**, `<admin-shell>` present but structurally broken (no
|
|
57
53
|
`<admin-content>` / no sidebar). Halt; re-author the outer composition from
|
|
58
54
|
the canonical source before continuing.
|
|
59
|
-
- **warning
|
|
55
|
+
- **warning**, a commonly-missing part (3, 5, 6, 7 spacer/actions, 8, 11)
|
|
60
56
|
absent, or the wrong primitive used (`menu-ui` context switcher, native
|
|
61
57
|
`<section>` where chrome was wanted).
|
|
62
|
-
- **info
|
|
58
|
+
- **info**, parts 12–13 absent; `data-shell-opt-out=` declared.
|
|
63
59
|
|
|
64
60
|
## What the script flags (mechanical subset)
|
|
65
61
|
|
|
66
62
|
| Symptom | Diagnosis |
|
|
67
63
|
|---|---|
|
|
68
|
-
| `<admin-shell>` with no `<admin-content>` | critical
|
|
69
|
-
| sidebar missing `<admin-statusbar slot="footer">` | warning
|
|
70
|
-
| content topbar missing `[data-spacer]` / `[data-actions]` | warning
|
|
71
|
-
| content missing trailing `<admin-statusbar>` | warning
|
|
72
|
-
| sidebar topbar contains only plain text | warning
|
|
64
|
+
| `<admin-shell>` with no `<admin-content>` | critical, broken outer composition |
|
|
65
|
+
| sidebar missing `<admin-statusbar slot="footer">` | warning, part 5 |
|
|
66
|
+
| content topbar missing `[data-spacer]` / `[data-actions]` | warning, part 7 |
|
|
67
|
+
| content missing trailing `<admin-statusbar>` | warning, part 11 |
|
|
68
|
+
| sidebar topbar contains only plain text | warning, part 3 context switcher |
|
|
73
69
|
| `<page-scroll>` missing around `<page-ui band>` | critical, part 9 (the enforcing script `audit-shell-composition.mjs` tiers this critical: without the scroll+chrome wrapper the content renders flush with the topbar, no margins). **[deleted, ADR-0098 / gh#3745]** `admin-scroll` and the `admin-page` family are both deleted outright, no compat alias; the successor is `page-scroll` wrapping `page-ui[band]` |
|
|
74
70
|
|
|
75
71
|
## Opt-out contract
|
|
@@ -87,7 +83,7 @@ for reviewers to sanity-check.
|
|
|
87
83
|
- Playground isolating ONE narrow feature → fix optional; annotating the
|
|
88
84
|
opt-out is acceptable.
|
|
89
85
|
- Never point this audit at `/site/components/*` demos (single-primitive
|
|
90
|
-
spotlights
|
|
86
|
+
spotlights, every one would "miss" an admin shell) or at consumer repos
|
|
91
87
|
(substrate-side tooling; consumers get the factory's forward-time pattern
|
|
92
88
|
gate instead).
|
|
93
89
|
- `:strict` is the CI/publish posture; keep the warn-only default while
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# Mode 2
|
|
1
|
+
# Mode 2, App-shell QA: pitfalls + fix recipes
|
|
2
2
|
|
|
3
3
|
Script: `node scripts/dev/audit-app-shells.mjs` (repo-local). Walks every
|
|
4
4
|
`apps/<name>/…/<page>.html` shell headlessly and checks console errors,
|
|
5
5
|
custom-element registration, collapsed heights, icon-ui presence, demo-root
|
|
6
6
|
flex, and network 4xx/5xx. Flags: `--only=NAME` · `--fail-fast` ·
|
|
7
7
|
`--compare-prod` (diff registered tags against the prod deploy) ·
|
|
8
|
-
`--playgrounds` (gh#3197
|
|
8
|
+
`--playgrounds` (gh#3197, also sweeps `playgrounds/<name>/app/<name>.html`,
|
|
9
9
|
same shell shape; opt-in because that root carries other pre-existing,
|
|
10
|
-
unaudited findings
|
|
10
|
+
unaudited findings, combine with `--only=NAME` to scope to one playground).
|
|
11
11
|
|
|
12
12
|
Prerequisites: `npm run dev` running (vite `:5173`); `npm run proxy` only when
|
|
13
13
|
probing chat / gen-ui pages. If vite is mid dep-reoptimization the first sweep
|
|
14
|
-
may stall
|
|
14
|
+
may stall, wait 30s, re-run.
|
|
15
15
|
|
|
16
16
|
## Pitfall → finding map (fix recipes apply unattended)
|
|
17
17
|
|
|
@@ -23,14 +23,13 @@ may stall — wait 30s, re-run.
|
|
|
23
23
|
| 4 | Top-level `await` without async setup wrap | `[setup-failed]` console error | `export default async function setup(host) { … }` |
|
|
24
24
|
| 5 | Vite import-analysis 500 on dynamic import | `[network-4xx] 500` for `./<name>.contents.js` | add `/* @vite-ignore */` to the dynamic import |
|
|
25
25
|
| 6 | icon-ui not imported despite `<icon-ui>` / `[icon=…]` / icon-rendering composites | `[icon-ui-missing]` | `import "/packages/web-components/components/icon/icon.js"` |
|
|
26
|
-
| 7 | `<admin-page-body>` emitted without its `<admin-page>` ancestor (gh#981) | *(no audit-app-shells.mjs tag
|
|
26
|
+
| 7 | `<admin-page-body>` emitted without its `<admin-page>` ancestor (gh#981) | *(no audit-app-shells.mjs tag, apps/-only script, doesn't sweep this surface)* | wrap in `<admin-page>`, `admin-page > admin-page-body { flex:1; … }` (`admin-shell.bespoke.css:144`) is a direct-child selector; without that literal parent, `admin-page-body` falls back to UA `display:inline`, **[deprecated 2026-09-01, ADR-0098]** `admin-page`/`admin-page-body` are retired deprecate-then-delete; author new surfaces with `page-ui[band]` instead |
|
|
27
27
|
|
|
28
|
-
Secondary signals: `[collapsed-element]` (registered but 0px tall
|
|
29
|
-
`audit-app-shells.mjs`'s own threshold is <4px, so a shallower-but-still-broken
|
|
28
|
+
Secondary signals: `[collapsed-element]` (registered but 0px tall, `audit-app-shells.mjs`'s own threshold is <4px, so a shallower-but-still-broken
|
|
30
29
|
collapse won't trip it), `[network-4xx]` (typoed stylesheet href, missing
|
|
31
30
|
contents.html, stale `import.meta.url`). Row 7's specific case (gh#981, in
|
|
32
31
|
`site/site.js`'s router, not swept by this script at all): the 150px isn't
|
|
33
|
-
`admin-page-body`'s own height
|
|
32
|
+
`admin-page-body`'s own height, it's a *replaced child* (an `<iframe>`)
|
|
34
33
|
whose `height:100%` can't resolve, so it falls back to the browser's
|
|
35
34
|
intrinsic default (300×150). The observable is a body rendering ~150px tall
|
|
36
35
|
with no console error, regardless of real content height.
|
|
@@ -51,11 +50,11 @@ with no console error, regardless of real content height.
|
|
|
51
50
|
## Registration diagnosis rules
|
|
52
51
|
|
|
53
52
|
- Bespoke shell children (`admin-sidebar`, `chat-thread`, `editor-sidebar`, …)
|
|
54
|
-
register only when their sibling JS loads
|
|
53
|
+
register only when their sibling JS loads, importing `admin-shell.js` alone
|
|
55
54
|
registers ONLY the host. Use the cluster barrel
|
|
56
55
|
`/packages/web-modules/<cluster>/index.js`.
|
|
57
56
|
- Some tags register in their **parent component's** `.js`, not a directory of
|
|
58
|
-
their own name
|
|
57
|
+
their own name, when deciding whether a tag is real, grep
|
|
59
58
|
`customElements.define`, never `ls components/`.
|
|
60
59
|
- `customElements.whenDefined(name)` never rejects; an un-imported name leaves
|
|
61
60
|
the promise pending forever. A `Promise.all([...]).then(bootstrap)` gate then
|
|
@@ -64,15 +63,14 @@ with no console error, regardless of real content height.
|
|
|
64
63
|
|
|
65
64
|
## False positives (already filtered by the script)
|
|
66
65
|
|
|
67
|
-
- CSS-only components (`aside-ui`, `header-ui`, `section-ui`, `footer-ui`)
|
|
68
|
-
some components ship `.yaml` + `.a2ui.json` with no `.js` by design; they are
|
|
66
|
+
- CSS-only components (`aside-ui`, `header-ui`, `section-ui`, `footer-ui`), some components ship `.yaml` + `.a2ui.json` with no `.js` by design; they are
|
|
69
67
|
real, not stubs.
|
|
70
68
|
- Inherently thin elements (`divider-ui`, `separator-ui`); empty containers
|
|
71
69
|
with no children.
|
|
72
70
|
|
|
73
71
|
## Verification + escalation
|
|
74
72
|
|
|
75
|
-
1. Apply diffs; re-run the audit
|
|
73
|
+
1. Apply diffs; re-run the audit, target 0 findings on real issues.
|
|
76
74
|
2. Spot-check the worst-affected page in a real browser.
|
|
77
75
|
3. Escalate when: a finding matches no pitfall above, >10 shells are affected,
|
|
78
76
|
or the fix would alter shared `catalog/` or `packages/` files.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Auto-fix allowlist
|
|
1
|
+
# Auto-fix allowlist, BUILDER-ONLY, the ONLY unattended fixes
|
|
2
2
|
|
|
3
3
|
**Routing:** every row below is a mutation (`perl -i`, in-place CSS/JS edits).
|
|
4
4
|
A read-only seat holds Bash, and Bash alone can run `perl -i` / `sed -i` /
|
|
5
|
-
`node -e` with a file write even without a Write or Edit tool
|
|
5
|
+
`node -e` with a file write even without a Write or Edit tool: the tool
|
|
6
6
|
allowlist is not the enforcement boundary, the routing rule is: these fixes
|
|
7
7
|
are executed by `primitive-authoring-agent` (or a human), never dispatched to or run
|
|
8
8
|
by `demo-audit-agent` or any other read-only dogfood seat. A read-only run
|
|
@@ -23,4 +23,4 @@ unrecognized component, native-primitive replacement (attribute-shape
|
|
|
23
23
|
decisions), card-header wrapper hoists (slot intent), any warning without an
|
|
24
24
|
allowlist row.
|
|
25
25
|
**NEVER exceed 5 mechanical fixes per PR or apply a fix outside this
|
|
26
|
-
allowlist
|
|
26
|
+
allowlist**, blast radius stays human-reviewable.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# Mode 6
|
|
1
|
+
# Mode 6, Card structure + anatomy docs coverage
|
|
2
2
|
|
|
3
3
|
Three probes; all static, pre-commit fast.
|
|
4
4
|
|
|
5
|
-
## Probe A
|
|
5
|
+
## Probe A, card-ui header `<div>` wrapper (grep, warning)
|
|
6
6
|
|
|
7
7
|
Header content wrapped in a bare `<div>` (no `slot=`) inside a `<card-ui>`
|
|
8
8
|
`<header>` bypasses card-ui's `:has(> [slot])` grid activator: title + badge
|
|
9
9
|
collapse into one full-width row instead of the 1fr-heading + auto-action
|
|
10
|
-
grid. **No console error
|
|
11
|
-
comes from the card's `@scope
|
|
10
|
+
grid. **No console error, pure silent visual regression.** (The header grid
|
|
11
|
+
comes from the card's `@scope`, `header-ui` has no CSS of its own, so only
|
|
12
12
|
correctly-slotted direct children activate it.)
|
|
13
13
|
|
|
14
14
|
```bash
|
|
@@ -27,12 +27,12 @@ while read -r file; do
|
|
|
27
27
|
done
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Fix (manual only
|
|
30
|
+
Fix (manual only, never auto-fix; which child gets `slot="action"` is
|
|
31
31
|
intent): hoist the children out of the wrapper `<div>`, apply `slot="action"`
|
|
32
|
-
to trailing badges/buttons. Scope stays `<card-ui>`-ancestored
|
|
32
|
+
to trailing badges/buttons. Scope stays `<card-ui>`-ancestored: the
|
|
33
33
|
`<div>`-wrapper pattern is acceptable in admin-topbar / drawer-ui headers.
|
|
34
34
|
|
|
35
|
-
## Probe B
|
|
35
|
+
## Probe B, card-ui body contract (npm gate, warning)
|
|
36
36
|
|
|
37
37
|
`npm run audit:card-structure` (`:strict` for CI). Direct flow children of
|
|
38
38
|
`<card-ui>` other than `<img>` / `<header>` / `<section>` / `<footer>` skip
|
|
@@ -40,7 +40,7 @@ the canonical body slot: `<section>`'s `margin: var(--card-inset)` is lost AND
|
|
|
40
40
|
the gen-UI corpus harvests the broken pattern as a training exemplar. Fix:
|
|
41
41
|
wrap in `<section>` (`<section bleed>` to zero the inset).
|
|
42
42
|
|
|
43
|
-
## Probe C
|
|
43
|
+
## Probe C, anatomy section coverage (grep + sweep, info)
|
|
44
44
|
|
|
45
45
|
A component's `*.examples.html` missing all of the schema-derivable anatomy
|
|
46
46
|
sections (`props` / `events` / `slots` / `data-attrs` / `keyboard` /
|
|
@@ -55,12 +55,11 @@ done
|
|
|
55
55
|
|
|
56
56
|
Fix: `node scripts/docs/anatomy-sweep.mjs` (preview with `--dry`) populates
|
|
57
57
|
sections from the `.a2ui.json` sidecar + yaml. Still skipped after the sweep →
|
|
58
|
-
the yaml is missing `props:`/`events:`/`slots:` declarations
|
|
58
|
+
the yaml is missing `props:`/`events:`/`slots:` declarations, investigate the
|
|
59
59
|
yaml, don't hand-author the section. Info-level only: CSS-only primitives
|
|
60
60
|
legitimately ship with just a `usage` section.
|
|
61
61
|
|
|
62
62
|
## When to run
|
|
63
63
|
|
|
64
64
|
After any wide screen-authoring sweep that generated `<card-ui>` blocks; after
|
|
65
|
-
a new-component yaml + examples author pass; before a docs-site refresh
|
|
66
|
-
target 0 findings or explicit opt-outs.
|
|
65
|
+
a new-component yaml + examples author pass; before a docs-site refresh, target 0 findings or explicit opt-outs.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
# Mode 5b
|
|
1
|
+
# Mode 5b, Chat-shell composition: the canonical parts
|
|
2
2
|
|
|
3
3
|
Script: `scripts/dev/audit-shell-composition.mjs` (repo-local), npm gates
|
|
4
4
|
`audit:shell-composition{,:strict,:all}`. Static AST walk over
|
|
5
|
-
`apps/**/*.html`, `playgrounds/**/*.html`, `catalog/page-shells/**/*.html
|
|
6
|
-
no browser needed; pre-commit fast. Shares one script and one output
|
|
5
|
+
`apps/**/*.html`, `playgrounds/**/*.html`, `catalog/page-shells/**/*.html`, no browser needed; pre-commit fast. Shares one script and one output
|
|
7
6
|
contract with the `<admin-shell>` census
|
|
8
|
-
([admin-shell-anatomy](admin-shell-anatomy.md))
|
|
7
|
+
([admin-shell-anatomy](admin-shell-anatomy.md)): the script's own `CHAT_PARTS`
|
|
9
8
|
array is the mechanical census; this file is the human review standard.
|
|
10
9
|
Canonical source: `packages/web-modules/chat/chat-shell/chat-shell.yaml`
|
|
11
10
|
(the behavioral contract) and `playgrounds/chat/app/chat.contents.html`
|
|
@@ -14,59 +13,59 @@ chrome-decision table as chat-shell's canonical demo).
|
|
|
14
13
|
|
|
15
14
|
`gh#2909`/`apps/genui/PATTERNS.md:329-337` established that `apps/genui`
|
|
16
15
|
(gen-ui, factory-chat) is a real `<chat-shell>` consumer that a
|
|
17
|
-
`<admin-shell>`-only mode 5 sweep never scanned
|
|
16
|
+
`<admin-shell>`-only mode 5 sweep never scanned, this anatomy closes that
|
|
18
17
|
blind spot.
|
|
19
18
|
|
|
20
19
|
## The canonical parts
|
|
21
20
|
|
|
22
21
|
1. `<chat-shell provider="…" model="…" proxy-url="…">` outer.
|
|
23
|
-
2. `<chat-thread>` direct child
|
|
22
|
+
2. `<chat-thread>` direct child, the message scroll surface. Required:
|
|
24
23
|
without it there is nowhere for the host's rendering pipeline to append
|
|
25
24
|
messages.
|
|
26
|
-
3. `<chat-thread> > <chat-empty>` as (typically first) child
|
|
25
|
+
3. `<chat-thread> > <chat-empty>` as (typically first) child, the
|
|
27
26
|
empty-state placeholder shown via the `[empty]` reflected attribute
|
|
28
27
|
before any message exists.
|
|
29
|
-
4. `<chat-composer>` direct child
|
|
30
|
-
5. `<chat-composer> > <chat-input-ui>` (or `<input-ui>`) inner child
|
|
28
|
+
4. `<chat-composer>` direct child, the input region.
|
|
29
|
+
5. `<chat-composer> > <chat-input-ui>` (or `<input-ui>`) inner child, the
|
|
31
30
|
actual input; a composer with no primitive input inside has nothing to
|
|
32
31
|
submit.
|
|
33
|
-
6. `<chat-header>` direct child
|
|
32
|
+
6. `<chat-header>` direct child, optional top chrome bar (name, status,
|
|
34
33
|
actions). When present, expected to carry `[slot="name"]` and
|
|
35
|
-
`[slot="status"]` (typically a `<chat-status>`)
|
|
34
|
+
`[slot="status"]` (typically a `<chat-status>`), a header with neither
|
|
36
35
|
is bare chrome with no identifying content.
|
|
37
|
-
7. `<chat-sidebar slot="leading"|"trailing"
|
|
36
|
+
7. `<chat-sidebar slot="leading"|"trailing">`, optional conversation-history
|
|
38
37
|
or inspector rail.
|
|
39
38
|
8. No generic layout primitive (`<col-ui>`, `<row-ui>`, `<stack-ui>`) as a
|
|
40
|
-
**direct child** of `<chat-shell
|
|
39
|
+
**direct child** of `<chat-shell>`, the shell's CSS lays out children by
|
|
41
40
|
tag selector (`chat-thread`, `chat-composer`, etc.); a generic wrapper
|
|
42
41
|
defeats that and the shell's `:has(chat-thread[streaming])` cross-cut
|
|
43
42
|
styling.
|
|
44
43
|
|
|
45
44
|
## Severity mapping
|
|
46
45
|
|
|
47
|
-
- **critical
|
|
46
|
+
- **critical**, `<chat-shell>` present but missing `<chat-thread>` or
|
|
48
47
|
`<chat-composer>` (parts 2, 4). The shell can't render a usable
|
|
49
48
|
conversation surface without both.
|
|
50
|
-
- **warning
|
|
49
|
+
- **warning**, `<chat-composer>` has no inner `<chat-input-ui>`/`<input-ui>`
|
|
51
50
|
(part 5); a `<chat-header>` present but missing both `[slot="name"]` and
|
|
52
51
|
`[slot="status"]` content (part 6); a generic layout primitive
|
|
53
52
|
(`col-ui`/`row-ui`/`stack-ui`) authored as a direct child (part 8).
|
|
54
|
-
- **info
|
|
53
|
+
- **info**, `<chat-thread>` missing its `<chat-empty>` first child (part 3;
|
|
55
54
|
a thread pre-seeded with real messages legitimately skips this);
|
|
56
55
|
`<chat-header>` absent entirely (part 6 is optional chrome);
|
|
57
|
-
`<chat-sidebar>` absent (part 7, forward-looking per the yaml
|
|
56
|
+
`<chat-sidebar>` absent (part 7, forward-looking per the yaml, chat is
|
|
58
57
|
typically single-pane).
|
|
59
58
|
|
|
60
59
|
## What the script flags (mechanical subset)
|
|
61
60
|
|
|
62
61
|
| Symptom | Diagnosis |
|
|
63
62
|
|---|---|
|
|
64
|
-
| `<chat-shell>` with no `<chat-thread>` | critical
|
|
65
|
-
| `<chat-shell>` with no `<chat-composer>` | critical
|
|
66
|
-
| `<chat-composer>` with no `<chat-input-ui>`/`<input-ui>` child | warning
|
|
67
|
-
| `<chat-header>` present, no `[slot="name"]` and no `[slot="status"]`/`<chat-status>` | warning
|
|
68
|
-
| `<chat-shell>` direct child is `col-ui`/`row-ui`/`stack-ui` | warning
|
|
69
|
-
| `<chat-thread>` with no `<chat-empty>` child | info
|
|
63
|
+
| `<chat-shell>` with no `<chat-thread>` | critical, part 2 |
|
|
64
|
+
| `<chat-shell>` with no `<chat-composer>` | critical, part 4 |
|
|
65
|
+
| `<chat-composer>` with no `<chat-input-ui>`/`<input-ui>` child | warning, part 5 |
|
|
66
|
+
| `<chat-header>` present, no `[slot="name"]` and no `[slot="status"]`/`<chat-status>` | warning, part 6 |
|
|
67
|
+
| `<chat-shell>` direct child is `col-ui`/`row-ui`/`stack-ui` | warning, part 8 (legacy-generic-layout leak) |
|
|
68
|
+
| `<chat-thread>` with no `<chat-empty>` child | info, part 3 |
|
|
70
69
|
|
|
71
70
|
## Opt-out contract
|
|
72
71
|
|
|
@@ -82,17 +81,17 @@ info and prints the reason for reviewers.
|
|
|
82
81
|
optional; annotate the opt-out.
|
|
83
82
|
- Never point this audit at `packages/web-modules/chat/**/*.examples.html`
|
|
84
83
|
or `packages/web-components/components/*/*.html` (single-primitive
|
|
85
|
-
spotlights)
|
|
84
|
+
spotlights), the script's `isShowcaseDemo`/showcase-path exclusion
|
|
86
85
|
already keeps those out of scope, same as admin-shell.
|
|
87
86
|
- `:strict` is the CI/publish posture; keep warn-only while iterating
|
|
88
87
|
locally.
|
|
89
88
|
|
|
90
|
-
## Legacy shapes
|
|
89
|
+
## Legacy shapes, never re-authored
|
|
91
90
|
|
|
92
91
|
`chat-shell.yaml`'s own description lists the ADR-0024-retired legacy
|
|
93
92
|
data-attribute shapes (`<section data-chat-messages>`, `<chat-input-ui
|
|
94
93
|
data-chat-input>`, `<empty-state-ui data-chat-empty>`, `<header
|
|
95
94
|
data-chat-name>`) as silently unrecognized, not merely deprecated. This
|
|
96
95
|
audit does not re-detect them (a separate concern from anatomy
|
|
97
|
-
completeness)
|
|
96
|
+
completeness), `verify:no-legacy-shell-shapes` in `npm run check` already
|
|
98
97
|
covers that ground.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
# Mode 5c
|
|
1
|
+
# Mode 5c, Editor-shell composition: the canonical parts
|
|
2
2
|
|
|
3
3
|
Script: `scripts/dev/audit-shell-composition.mjs` (repo-local), npm gates
|
|
4
4
|
`audit:shell-composition{,:strict,:all}`. Static AST walk over
|
|
5
|
-
`apps/**/*.html`, `playgrounds/**/*.html`, `catalog/page-shells/**/*.html
|
|
6
|
-
no browser needed; pre-commit fast. Shares one script and one output
|
|
5
|
+
`apps/**/*.html`, `playgrounds/**/*.html`, `catalog/page-shells/**/*.html`, no browser needed; pre-commit fast. Shares one script and one output
|
|
7
6
|
contract with the `<admin-shell>` census
|
|
8
|
-
([admin-shell-anatomy](admin-shell-anatomy.md))
|
|
7
|
+
([admin-shell-anatomy](admin-shell-anatomy.md)): the script's own
|
|
9
8
|
`EDITOR_PARTS` array is the mechanical census; this file is the human
|
|
10
9
|
review standard. Canonical source:
|
|
11
10
|
`packages/web-modules/editor/editor-shell/editor-shell.yaml` (the
|
|
@@ -16,63 +15,62 @@ chrome-decision table as editor-shell's canonical demo, alongside
|
|
|
16
15
|
|
|
17
16
|
`gh#2909`/`apps/genui/PATTERNS.md:329-337` established that `apps/genui`
|
|
18
17
|
(a2ui-editor) is a real `<editor-shell>` consumer that a
|
|
19
|
-
`<admin-shell>`-only mode 5 sweep never scanned
|
|
18
|
+
`<admin-shell>`-only mode 5 sweep never scanned, this anatomy closes that
|
|
20
19
|
blind spot.
|
|
21
20
|
|
|
22
21
|
## The canonical parts
|
|
23
22
|
|
|
24
23
|
1. `<editor-shell>` outer.
|
|
25
|
-
2. `<editor-canvas>` direct child
|
|
24
|
+
2. `<editor-canvas>` direct child, the central work surface. Required:
|
|
26
25
|
without it there is nowhere for artboards/document body/canvas content
|
|
27
26
|
to land, the editor equivalent of admin-shell's `<admin-content>`.
|
|
28
|
-
3. `<editor-toolbar>` direct child
|
|
27
|
+
3. `<editor-toolbar>` direct child, the app-scope top chrome bar (document
|
|
29
28
|
title, run/save/undo/redo, focus-mode toggle). Recommended; an editor
|
|
30
29
|
with no toolbar has no document-wide action surface.
|
|
31
|
-
4. `<editor-canvas> > <editor-canvas-empty>` as (typically first) child
|
|
32
|
-
the empty-state placeholder shown via the parent's `[empty]` reflected
|
|
30
|
+
4. `<editor-canvas> > <editor-canvas-empty>` as (typically first) child, the empty-state placeholder shown via the parent's `[empty]` reflected
|
|
33
31
|
attribute before any content exists.
|
|
34
|
-
5. `<editor-canvas> > <editor-canvas-toolbar
|
|
32
|
+
5. `<editor-canvas> > <editor-canvas-toolbar>`, optional canvas-scope
|
|
35
33
|
chrome (view-mode tabs, breadcrumbs) sticky to the canvas top edge;
|
|
36
34
|
distinct from part 3's app-scope toolbar.
|
|
37
|
-
6. `<editor-statusbar>` direct child
|
|
35
|
+
6. `<editor-statusbar>` direct child, bottom chrome bar (save/sync state,
|
|
38
36
|
zoom, cursor position). Recommended; loses the canonical status-strip
|
|
39
37
|
without it.
|
|
40
|
-
7. `<editor-sidebar slot="leading"|"trailing"
|
|
38
|
+
7. `<editor-sidebar slot="leading"|"trailing">`, optional navigator or
|
|
41
39
|
inspector rail.
|
|
42
40
|
8. When an `<editor-sidebar>` is present, it must wrap `<pane-ui
|
|
43
|
-
resizable>` (or at minimum `<pane-ui>`)
|
|
41
|
+
resizable>` (or at minimum `<pane-ui>`), editor-sidebar is the one
|
|
44
42
|
bespoke shell child that **delegates** rather than duplicates a
|
|
45
43
|
primitive's resize behavior (per `shell-patterns.md`'s "FIRST bespoke
|
|
46
44
|
shell child that delegates" note); an editor-sidebar with no inner
|
|
47
45
|
`<pane-ui>` reimplements drag by hand instead of reusing the primitive.
|
|
48
46
|
9. No bare `<header>` / `<footer>` native elements as direct children of
|
|
49
|
-
`<editor-shell
|
|
47
|
+
`<editor-shell>`: these are the ADR-0024-retired legacy chrome shapes
|
|
50
48
|
that `<editor-toolbar>` / `<editor-statusbar>` replaced.
|
|
51
49
|
|
|
52
50
|
## Severity mapping
|
|
53
51
|
|
|
54
|
-
- **critical
|
|
52
|
+
- **critical**, `<editor-shell>` present but missing `<editor-canvas>`
|
|
55
53
|
(part 2). The shell can't render usable content without it.
|
|
56
|
-
- **warning
|
|
54
|
+
- **warning**, no `<editor-toolbar>` (part 3); no `<editor-statusbar>`
|
|
57
55
|
(part 6); an `<editor-sidebar>` present with no inner `<pane-ui>` (part
|
|
58
56
|
8); a bare native `<header>`/`<footer>` direct child (part 9, the
|
|
59
57
|
retired-legacy-shape leak).
|
|
60
|
-
- **info
|
|
58
|
+
- **info**, `<editor-canvas>` missing its `<editor-canvas-empty>` first
|
|
61
59
|
child (part 4; a canvas pre-seeded with real content legitimately skips
|
|
62
60
|
this); no `<editor-canvas-toolbar>` (part 5, optional canvas chrome); no
|
|
63
|
-
`<editor-sidebar>` at all (part 7
|
|
61
|
+
`<editor-sidebar>` at all (part 7, `construct-canvas`'s own comment
|
|
64
62
|
notes "no leading pane today", a legitimately sidebar-less composition).
|
|
65
63
|
|
|
66
64
|
## What the script flags (mechanical subset)
|
|
67
65
|
|
|
68
66
|
| Symptom | Diagnosis |
|
|
69
67
|
|---|---|
|
|
70
|
-
| `<editor-shell>` with no `<editor-canvas>` | critical
|
|
71
|
-
| `<editor-shell>` with no `<editor-toolbar>` | warning
|
|
72
|
-
| `<editor-shell>` with no `<editor-statusbar>` | warning
|
|
73
|
-
| `<editor-sidebar>` present, no inner `<pane-ui>` | warning
|
|
74
|
-
| `<editor-shell>` direct child is native `<header>`/`<footer>` | warning
|
|
75
|
-
| `<editor-canvas>` with no `<editor-canvas-empty>` child | info
|
|
68
|
+
| `<editor-shell>` with no `<editor-canvas>` | critical, part 2 |
|
|
69
|
+
| `<editor-shell>` with no `<editor-toolbar>` | warning, part 3 |
|
|
70
|
+
| `<editor-shell>` with no `<editor-statusbar>` | warning, part 6 |
|
|
71
|
+
| `<editor-sidebar>` present, no inner `<pane-ui>` | warning, part 8 (delegation contract violated) |
|
|
72
|
+
| `<editor-shell>` direct child is native `<header>`/`<footer>` | warning, part 9 (retired-legacy-shape leak) |
|
|
73
|
+
| `<editor-canvas>` with no `<editor-canvas-empty>` child | info, part 4 |
|
|
76
74
|
|
|
77
75
|
## Opt-out contract
|
|
78
76
|
|
|
@@ -88,17 +86,16 @@ info and prints the reason for reviewers.
|
|
|
88
86
|
optional; annotate the opt-out.
|
|
89
87
|
- Never point this audit at `packages/web-modules/editor/**/*.examples.html`
|
|
90
88
|
or `packages/web-components/components/*/*.html` (single-primitive
|
|
91
|
-
spotlights)
|
|
89
|
+
spotlights), the script's `isShowcaseDemo`/showcase-path exclusion
|
|
92
90
|
already keeps those out of scope, same as admin-shell.
|
|
93
|
-
- **Don't nest `<editor-shell>` inside `<admin-shell>`** as page chrome
|
|
94
|
-
`editor-shell.examples.html` documents them as sibling surfaces, not
|
|
91
|
+
- **Don't nest `<editor-shell>` inside `<admin-shell>`** as page chrome, `editor-shell.examples.html` documents them as sibling surfaces, not
|
|
95
92
|
nested; this audit doesn't mechanically flag the nesting mistake (a
|
|
96
93
|
cross-shell structural rule, not a within-shell anatomy gap), but a
|
|
97
94
|
reviewer seeing both tags in one file should treat it as a design smell.
|
|
98
95
|
- `:strict` is the CI/publish posture; keep warn-only while iterating
|
|
99
96
|
locally.
|
|
100
97
|
|
|
101
|
-
## Legacy shapes
|
|
98
|
+
## Legacy shapes, never re-authored
|
|
102
99
|
|
|
103
100
|
`editor-shell.yaml`'s own description lists the ADR-0024-retired legacy
|
|
104
101
|
data-attribute shapes (`<header>`, `<div data-editor-body>`, `<pane-ui
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Mode 3
|
|
1
|
+
# Mode 3, HTML attr-quote typo sweep
|
|
2
2
|
|
|
3
3
|
Bug class: an attribute value opens with `"`, embeds unescaped `"` characters,
|
|
4
|
-
and closes with another `"
|
|
4
|
+
and closes with another `"`, the parser closes the value at the second quote
|
|
5
5
|
and sprays the rest as junk attributes:
|
|
6
6
|
|
|
7
7
|
```html
|
|
@@ -10,14 +10,14 @@ and sprays the rest as junk attributes:
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Sibling traps in the same family: `\"` inside attribute values (JSON pasted
|
|
13
|
-
into HTML
|
|
14
|
-
entity-opened quote never closed)
|
|
13
|
+
into HTML, backslash escapes don't exist in HTML) and `data-x=""…` (an
|
|
14
|
+
entity-opened quote never closed), both swallow the parser past the next
|
|
15
15
|
quote. Sweep them with the same one-attribute-at-a-time discipline.
|
|
16
16
|
|
|
17
17
|
Scope: rendered HTML files only. Not for `<script>` blocks, JS template
|
|
18
18
|
literals, Markdown, JSX, or single isolated typos (targeted edit instead).
|
|
19
19
|
|
|
20
|
-
## Audit (narrow regex
|
|
20
|
+
## Audit (narrow regex, never a broad one)
|
|
21
21
|
|
|
22
22
|
```js
|
|
23
23
|
// An attribute closes with " and the next char is not whitespace or >
|
|
@@ -31,29 +31,28 @@ Attribute order (run each independently, never one glob regex over all):
|
|
|
31
31
|
`data-artifact-label` → `data-note` → `aria-label` → `title` → `alt` →
|
|
32
32
|
`placeholder`.
|
|
33
33
|
|
|
34
|
-
## Fix (greedy capture
|
|
34
|
+
## Fix (greedy capture, stops at `>`, never crosses a tag boundary)
|
|
35
35
|
|
|
36
36
|
```js
|
|
37
37
|
const FIX = new RegExp(
|
|
38
38
|
`${ATTR}="([^>]*[a-z0-9][a-z0-9_-]*="[^"]*")"(?=[\\s>])`, 'g');
|
|
39
39
|
const fixed = html.replace(FIX, (_m, value) =>
|
|
40
40
|
value.includes("'")
|
|
41
|
-
? `${ATTR}="${value.replace(/"/g, '"')}"` // value has '
|
|
41
|
+
? `${ATTR}="${value.replace(/"/g, '"')}"` // value has ', entity-escape
|
|
42
42
|
: `${ATTR}='${value}'`); // else single-quote outside
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Remaining hits after the automated pass are edge cases (trailing prose, no
|
|
46
|
-
`ident=` prefix)
|
|
46
|
+
`ident=` prefix), fix each with a targeted edit; do not extend the regex.
|
|
47
47
|
|
|
48
48
|
## Anti-patterns
|
|
49
49
|
|
|
50
|
-
- Never sweep with a broad regex like `="[^"]*"[^"]*"` across all attributes
|
|
51
|
-
|
|
52
|
-
- Never use the non-greedy capture variant — it stops at the first `"` and
|
|
50
|
+
- Never sweep with a broad regex like `="[^"]*"[^"]*"` across all attributes, thousands of false positives on legitimate multi-attribute tags.
|
|
51
|
+
- Never use the non-greedy capture variant, it stops at the first `"` and
|
|
53
52
|
captures only `name=` instead of `name="attachment"`.
|
|
54
|
-
- Never run the regexes inside `<script>` blocks
|
|
53
|
+
- Never run the regexes inside `<script>` blocks, JS quoting rules differ.
|
|
55
54
|
- Never skip the re-audit after the automated pass.
|
|
56
|
-
- Never commit the one-shot script
|
|
55
|
+
- Never commit the one-shot script, run from the scratchpad or `node -e`.
|
|
57
56
|
|
|
58
57
|
## Verification (all three)
|
|
59
58
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Mode 7
|
|
1
|
+
# Mode 7, the `dogfood:status` battery
|
|
2
2
|
|
|
3
3
|
`npm run dogfood:status` runs seven static-analysis audits and aggregates them
|
|
4
4
|
into `qa/findings/dogfood-tracker.md` (the "what's open right now" ledger, on
|
|
5
|
-
its own P0–P3 severity scale
|
|
5
|
+
its own P0–P3 severity scale, see the script's header comment, distinct from
|
|
6
6
|
the critical/warning/info contract modes 1–6 use):
|
|
7
7
|
|
|
8
8
|
- `audit:warning-strong-vs-bg`
|
|
@@ -14,9 +14,9 @@ the critical/warning/info contract modes 1–6 use):
|
|
|
14
14
|
- `audit:icon-color-inherit`
|
|
15
15
|
|
|
16
16
|
Each is also runnable standalone with `--json`/`:strict`. Fix templates are
|
|
17
|
-
inline in `scripts/qa/dogfood-status.mjs`'s `AUDITS` array
|
|
17
|
+
inline in `scripts/qa/dogfood-status.mjs`'s `AUDITS` array, no separate
|
|
18
18
|
reference doc for this mode.
|
|
19
19
|
|
|
20
|
-
`npm run dogfood:status` does **not** roll up modes 1–6
|
|
20
|
+
`npm run dogfood:status` does **not** roll up modes 1–6, it runs only this
|
|
21
21
|
mode-7 battery. Regenerate the ledger after any mode-7 sweep; modes 1–6 file
|
|
22
22
|
their own reports per SKILL.md's "Findings home + PR shape" section.
|