Reconcile interactive-element docs with the engine; add a build verifier#12
Open
kurtvalcorza wants to merge 1 commit into
Open
Reconcile interactive-element docs with the engine; add a build verifier#12kurtvalcorza wants to merge 1 commit into
kurtvalcorza wants to merge 1 commit into
Conversation
… add verifier The reference docs had drifted from main.js in ways that produce broken or confusing courses. This corrects them and adds guardrails: - interactive-elements.md: add an "engine contract" up top and fix the examples that disagree with main.js — the architecture diagram no longer uses a non-existent showArchDesc() onclick (it threw); layer-toggle now passes the button (showLayer(id, this)); drag-and-drop passes a container id (checkDnD/resetDnD). Plus notes that quiz feedback is auto-prefixed and that flow data-steps is single-quoted JSON (a stray apostrophe breaks it). - gotchas.md: document the real failure modes — malformed quiz blocks (stray ">"), apostrophes in flow data-steps, fonts requiring a network, and shipping without verifying. - SKILL.md: add a Phase 4 verification step, environment notes (output is a folder not one file; Windows/PowerShell; headless screenshots hang on fonts), and note a filesystem copy of the boilerplate is fine. - README.md: correct the "single self-contained HTML file / offline" claim (output is a 3-file folder + Google Fonts CDN) and refresh the structure tree. - scripts/verify_courses.py: new build verifier that HTML-parses each index.html and checks structure + interactive wiring. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While building a batch of courses with this skill I hit a few places where
references/had drifted from the actualmain.jsengine — enough to produce broken or confusing output. This PR corrects the docs, hardens the most error-prone authoring patterns, and adds an optional build verifier. No engine or design changes.Doc ↔ engine fixes (
references/interactive-elements.md)onclick="showArchDesc(this)"from the example — that function does not exist inmain.js(clicks are auto-bound and readdata-desc), so following the example threw at runtime.showLayer('html')->showLayer('layer-html', this)— the engine needs the button to locate the enclosing.layer-demo.checkDnD()/resetDnD()->checkDnD('<id>')/resetDnD('<id>'), and gave the container anid.checkQuizauto-prepends "Exactly!"/"Not quite." (so explanations should not repeat them), and that flowdata-stepsis single-quoted JSON (a literal apostrophe breaksJSON.parse).Hardening & docs
gotchas.md: documented the real failure modes — malformed quiz blocks (a stray>truncating the tag), apostrophes in flowdata-steps, fonts requiring a network, and shipping without verifying.SKILL.md: added a Phase 4 verification step, environment notes (output is a folder not a single file; Windows/PowerShell; headless screenshots can hang on the Fonts CDN), and noted a filesystem copy of the boilerplate is fine.README.md: corrected the "single self-contained HTML file ... works offline" line (the output is a 3-file folder and pulls fonts from the Google Fonts CDN) and refreshed the structure tree.New (additive)
scripts/verify_courses.py: HTML-parses each builtindex.htmland checks structure + interactive wiring (modules == nav-dots, at least one chat + one flow, one quiz per module with all threedata-*attributes intact, every flowdata-stepsparses, no leftover placeholders).Happy to split this up or drop the verifier if you would prefer a smaller PR.