# CLAUDE.md This file guides Claude Code (claude.ai/code) when working in this repository. This is the **slim `main` branch** of VARASYS PolyMeter — a polymetric groove-trainer / metronome. Only three things ship here: - `index.html` — the landing chooser: two buttons, **Mobile** → `mobile.html` and **Desktop** → `pm_e-2.html`. - `mobile.html` — the touch-first phone/tablet **PWA** (+ `mobile-sessions.html`, its practice journal). Installable, works offline via `mobile-sw.js` + `manifest.webmanifest`. - `pm_e-2.html` — the engraved-notation editor. The **full project** (the PM_E-1 editor, the embeddable widget, every hardware form-factor page, the Pico **firmware** editions, the **Rust** port, and the **KiCad/SPICE hardware** design) lives on the **`concepts`** branch. Pull anything back from there if it needs to return to the front page. ## Commands ```sh ./build.sh # assemble the self-contained pages into dist/ (git-ignored) ./deploy.sh # build, stamp version, mirror dist/ to the Caddy web root, smoke-test ``` There's no test suite on this branch (the track-format conformance suite lives on `concepts`). ## Build system Every deployed page is **one self-contained `.html` file, zero runtime dependencies** — no framework, no CDN, no audio samples (all voices are synthesized in Web Audio). Pages share code through build markers that `build.sh` resolves: - `/*@BUILD:include:src/@*/` inlines a shared partial (`engine.js`, `setlists.js`, `base.css`, `chrome.js`, `header.html`/`footer.html`, `notation.js`, `midiout.js`). - `@BUILD:favicon@` / `@BUILD:logo-*@` / `@BUILD:bravura@` inline base64 blobs from `assets/`. `build.sh` asserts no `@BUILD:` markers survive. **`dist/` is generated and git-ignored — never edit it by hand.** Edit the source `*.html` in the repo root and the partials in `src/`; `deploy.sh` always builds first, then mirrors `dist/` to the web root with `rsync --delete` (so anything no longer built is removed from the live site). State (set lists, practice log, theme) lives in `localStorage`; nothing is uploaded — share links encode everything in the URL hash (`#p=` patch, `#sl=` base64url set list). Source files keep an `APP_VERSION` placeholder; only the deployed copy is stamped (from `VERSION`). ## License GNU AGPL v3 (`LICENSE`).