Check a small site with lmhtml
These commands were run with lmhtml v0.2.0 and lmscript 0.2.348 against a synthetic site. The sample has one missing internal link, an external link, and a generated link ignored by policy.
1. Compile the link check
Compile the `_dsl_` script against the lmhtml schema. In this example, build/check-links.lms uses html.load_dir, foreach loops and link_kind to apply an explicit skip policy.
npx --yes --package=@lmctl-ai/lmctl -- lmscript build/check-links.lms (no output; exit 0)
2. Run it and inspect the finding
The bytecode runs in lmhtml; the report lists only the broken internal destination.
lmhtml --dsl build/check-links.dslb
{"ok": true, "result": null}
cat build/links.txt
broken-link site/index.html:0: missing.html not found
3. Find a class typo with a loop
The class audit compares classes used by the pages with selectors in the local stylesheet. A typo gets a suggestion.
npx --yes --package=@lmctl-ai/lmctl -- lmscript build/check-classes.lms
(no output; exit 0)
lmhtml --dsl build/check-classes.dslb
{"ok": true, "result": null}
cat build/classes.txt
class-undefined site:0: heding (did you mean heading?)
id-unused site:0: teem (did you mean team?)
4. Compare two page versions
Structural diff reports meaningful changes while normalizing incidental markup noise.
npx --yes --package=@lmctl-ai/lmctl -- lmscript build/diff.lms
(no output; exit 0)
lmhtml --dsl build/diff.dslb
{"ok": true, "result": null}
cat build/diff.txt
diff-changed compare/before/page.html:0: html > body:nth-child(2) > p.intro:nth-child(2): text differs
diff-added compare/after/page.html:0: html > body:nth-child(2) > p:nth-child(3)
summary page:0: 2 differences
What you learned
Compile against the host's embedded JSON schema, let the host inspect a synthetic site, and read its report before applying any changes. Host collections work with foreach, while link policy stays explicit in the script.