diff --git a/CLAUDE.md b/CLAUDE.md index 88e2faa..0b79d5e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ # Godstrument — Claude context -Music-instrument web app; hosted at godstrument.pro on the **botchat** VPS (`humanjing@100.71.119.27`, exposed via Cloudflare Tunnel — NOT dealgod, despite earlier notes). App dir `/home/humanjing/godstrument` (not a git checkout). Deploy = rsync git-tracked files only (`--files-from=<(git ls-files)`, never `--delete`, never push `godstrument_users.db`/`auth_secret`/`patches/`) then `sudo -n systemctl restart godstrument`. Origin is Gitea `ssh://git@100.71.119.27:222/monster/Godstrument.git`. See [[godstrument-pro-deploy]]. +Music-instrument web app; hosted at godstrument.pro on the **botchat** VPS (`humanjing@100.71.119.27`, exposed via Cloudflare Tunnel — NOT dealgod, despite earlier notes). App dir `/home/humanjing/godstrument` (not a git checkout). Deploy = rsync git-tracked files only, **minus dev docs/scripts** (`--files-from=<(git ls-files | grep -vE '^(CLAUDE\.md|README\.md|ZERO_OMNI_BRIEF\.md|GODSTRUMENT_MANUAL_SOURCE\.md|godstrument\.txt|build_manual\.py|test_.*\.py)$')`, never `--delete`, never push `godstrument_users.db`/`auth_secret`/`patches/`) then `sudo -n systemctl restart godstrument`. The **user manual** ships as `viz/manual.html` (served at godstrument.pro/manual.html), generated from the in-app grimoire by `python3 build_manual.py` — re-run it after editing the grimoire. Working notes/planning docs stay OUT of the deploy. Origin is Gitea `ssh://git@100.71.119.27:222/monster/Godstrument.git`. See [[godstrument-pro-deploy]]. - **Canon gotcha:** the real spec prose lives in `viz/index.html` (grimoire text around line ~950); `GODSTRUMENT_MANUAL_SOURCE.md` claims to be exhaustive but has drifted before (Earth Echo / Schumann layer was missing). When they disagree, **viz/index.html is truth** — update the manual to match, not the other way. - Secrets (Cloudflare token etc.): read from `.env`/local files, never from chat. A CF token was pasted in chat once and rolled — don't repeat that. diff --git a/build_manual.py b/build_manual.py new file mode 100644 index 0000000..9f45bd6 --- /dev/null +++ b/build_manual.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Generate viz/manual.html — the polished standalone user manual — from the +in-app grimoire in viz/index.html (the single source of truth per CLAUDE.md). +Re-run whenever the grimoire changes: python3 build_manual.py + +ponytail: string-slice extraction, no HTML parser dep. The grimoire is a flat, +well-formed block; if its shape ever changes, this fails loudly (asserts) rather +than emitting a broken page. +""" +import re +import sys +import pathlib + +HERE = pathlib.Path(__file__).parent +SRC = HERE / "viz" / "index.html" +OUT = HERE / "viz" / "manual.html" + +html = SRC.read_text(encoding="utf-8") + +# --- 1. the whole ", html, re.S) +assert m, "no + + +
+ +{grim.replace('