From 543e118123ce4833acccd4b37fa46ae33fa7a45f Mon Sep 17 00:00:00 2001 From: Mitch Date: Tue, 9 Jun 2026 11:39:38 +1000 Subject: [PATCH] feat(scripts): add an HTML tag-balance validator and a speaker-note confidentiality step Two authoring gaps that surfaced shipping a real deck. A stdlib HTML tag-balance validator wired into the validate-and-save steps catches unbalanced markup before deploy, and a confidentiality step greps for identifiers and strips slide-notes from the deployed copy when they must not ship. Co-Authored-By: Leslie Barbara Knope (Claude Opus 4.8 (1M context)) --- SKILL.md | 10 ++- references/presentation-layer.md | 7 +- scripts/validate-html.py | 102 ++++++++++++++++++++++++++++ scripts/validate-html.test.py | 113 +++++++++++++++++++++++++++++++ 4 files changed, 227 insertions(+), 5 deletions(-) create mode 100644 scripts/validate-html.py create mode 100644 scripts/validate-html.test.py diff --git a/SKILL.md b/SKILL.md index 37d3073d..a3c3a2b5 100644 --- a/SKILL.md +++ b/SKILL.md @@ -108,6 +108,8 @@ When modifying existing presentations, make **minimal changes** — only touch w **If any rule fails after editing, fix it before saving.** +Then run the HTML tag-balance check: `python scripts/validate-html.py `. It exits non-zero and names the offending tag on any unclosed or mismatched tag, which catches a broken edit the spec rules do not. Fix any reported tag before saving. + --- ## Phase 1: Choose Mode @@ -446,7 +448,7 @@ Always embed inline speaker notes in each slide. If the source had speaker notes ### Step 5.5: Validate & Save -Before saving, verify all 8 spec rules pass. Fix any that fail. Save the HTML file. +Before saving, verify all 8 spec rules pass. Fix any that fail. Then run `python scripts/validate-html.py ` to confirm every tag is balanced, and fix any unclosed or mismatched tag it names. Save the HTML file. --- @@ -479,12 +481,13 @@ Deploys the presentation to a permanent shareable URL. Works on any device. 2. **Check login** — Run `npx vercel whoami`. If not logged in, guide through: - Sign up at https://vercel.com/signup (free) - Run `vercel login` to authorize -3. **Deploy** — Run: +3. **Check confidentiality** - A public deploy ships the whole file, including every inline `