From 1b738475e66e9f3d3ff7edacc27b390540e61235 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 4 Oct 2026 21:02:09 +0000 Subject: [PATCH] feat(lint-artifact): compare an update against the prior file --against fails dropped ids, a dropped copy-as-prompt control, or a deleted inline script. --allow-dropped-id covers an intentional rename. JSON source islands stay podcast-only. Co-authored-by: Todd Dailey --- SKILL.md | 2 +- scripts/lint-artifact.mjs | 72 ++++++++++++++++++++++++++++++++++++--- tests/test_linters.py | 43 +++++++++++++++++++++++ 3 files changed, 111 insertions(+), 6 deletions(-) diff --git a/SKILL.md b/SKILL.md index 4db2f7d..07e6905 100644 --- a/SKILL.md +++ b/SKILL.md @@ -522,7 +522,7 @@ Dark (via prefers-color-scheme): The *judgment* items (shape fit, headlines that argue, flatten test) are enforced by me before I touch Write — skipping them is how v1 *Magnifica Humanitas* shipped. The *mechanical* items (self-containment, favicon, social-card meta, ≥3 HTML-native features, copy-as-prompt naming + state delimiting, clipboard guard, no copy-as-markdown, no `` placeholder, SVG sizing, long-form floor) are now also checkable by a tool — run it in step 7. 6. **Write to `~/Reports/-.html`** -7. **Lint the output — hard gate:** run `node /scripts/lint-artifact.mjs ` (add `--longform` for ≥5,000-word source renders). Fix every `✗ FAIL` before reporting done; `⚠` warnings are judgment calls. Beyond the mechanical checklist, the linter now **compiles every inline `", "", src, flags=__import__("re").I) + ) + r = _run("scripts/lint-artifact.mjs", "--against", "examples/dashboard.html", str(bad)) + assert r.returncode == 1 + assert "script" in r.stdout.lower() + + def test_gallery_pages_pass_the_full_artifact_gate(): """examples/index.html and examples/primitives.html used to clear the >=3 feature floor on phantom prose matches ("search"/"filter"/"toggle" as WORDS)