diff --git a/.github/workflows/update-wasm.yml b/.github/workflows/update-wasm.yml
new file mode 100644
index 0000000..ebb2e7d
--- /dev/null
+++ b/.github/workflows/update-wasm.yml
@@ -0,0 +1,46 @@
+name: Update WASM Playground
+
+on:
+ schedule:
+ - cron: '17 * * * *'
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+jobs:
+ update-wasm:
+ name: Pull latest WASM artifacts
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Download WASM release assets
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ mkdir -p playground
+ gh release download wasm-latest \
+ --repo ChaiScript/ChaiScript \
+ --pattern 'chaiscript.js' \
+ --pattern 'chaiscript.wasm' \
+ --dir playground \
+ --clobber
+
+ - name: Check for changes
+ id: changes
+ run: |
+ git add playground/
+ if git diff --cached --quiet; then
+ echo "changed=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "changed=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Commit and push
+ if: steps.changes.outputs.changed == 'true'
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git commit -m "Update WASM playground artifacts from ChaiScript/ChaiScript"
+ git push
diff --git a/_includes/header.html b/_includes/header.html
index e708a4d..f134859 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -26,6 +26,9 @@
+
+
+
+
+
+ Ctrl+Enter to run
+
+
+
+
+
+
+
diff --git a/test_playground.sh b/test_playground.sh
new file mode 100644
index 0000000..524659a
--- /dev/null
+++ b/test_playground.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+# Regression test for issue #6: WASM playground
+# Validates that all required files exist and contain expected content.
+set -euo pipefail
+
+REPO_ROOT="$(cd "$(dirname "$0")" && pwd)"
+FAIL=0
+
+assert_file_exists() {
+ if [ ! -f "$REPO_ROOT/$1" ]; then
+ echo "FAIL: $1 does not exist"
+ FAIL=1
+ else
+ echo "PASS: $1 exists"
+ fi
+}
+
+assert_file_contains() {
+ if ! grep -q "$2" "$REPO_ROOT/$1" 2>/dev/null; then
+ echo "FAIL: $1 does not contain '$2'"
+ FAIL=1
+ else
+ echo "PASS: $1 contains '$2'"
+ fi
+}
+
+# 1. GitHub Actions workflow exists and runs hourly
+assert_file_exists ".github/workflows/update-wasm.yml"
+assert_file_contains ".github/workflows/update-wasm.yml" "schedule"
+assert_file_contains ".github/workflows/update-wasm.yml" "cron:"
+assert_file_contains ".github/workflows/update-wasm.yml" "wasm-latest"
+assert_file_contains ".github/workflows/update-wasm.yml" "ChaiScript/ChaiScript"
+
+# 2. Playground page exists with required elements
+assert_file_exists "playground.html"
+assert_file_contains "playground.html" "chaiscript.js"
+assert_file_contains "playground.html" "Module"
+assert_file_contains "playground.html" "header.html"
+
+# 3. Navigation includes playground link
+assert_file_contains "_includes/header.html" "playground"
+
+if [ "$FAIL" -ne 0 ]; then
+ echo ""
+ echo "RESULT: SOME TESTS FAILED"
+ exit 1
+fi
+
+echo ""
+echo "RESULT: ALL TESTS PASSED"
+exit 0