This repository includes guidance for AI coding assistants (Codex CLI and Claude) to work consistently across development, docs, and releases.
- Source of truth: version in
package.json - Two changelogs to maintain:
CHANGELOG.mdanddocs/changelog.html - Examples in
examples/are local-dev; docs copies live indocs/examples/(CDN) - Docs analytics is centralized in
docs/assets/navigation.js; do not add it todocs/demo.html - Always run
npm run buildbefore testing examples - Use
node docs/copy-examples.jsto re-copy examples and bump CDN version - Update the homepage version pill in
docs/index.htmlwhen releasing (version text + release month/date) - Keep diffs minimal and focused; don’t fix unrelated issues
- Dev servers:
npm run dev(ordev:basic,dev:dragdrop,dev:embed)
- Build + lint:
npm run buildnpm run lint
- Docs:
npm run docs:serve(local static docs on :8000)npm run docs:examples(copy examples → docs + set CDN version)
- Versioning:
npm version patch|minor|major(runs build + lint via prepublishOnly)
- Release:
git push origin main --tagsnpm publish(public)
- Merge feature branch →
main - Update root changelog:
CHANGELOG.md - Update docs changelog:
docs/changelog.html - Bump version in
package.json(manually or vianpm version patch|minor|major) - Build + lint:
npm run build && npm run lint - CRITICAL: Run
node docs/copy-examples.jsto sync docs examples with new version- This script reads version from package.json and updates ALL CDN references automatically
- Updates: docs/examples/, docs/installation.html, docs/demo.html, docs/examples.html, docs/changelog.html
- Manually update remaining CDN references:
README.md(version badge text + CDN URLs in Quick Start section)docs/index.html(homepage version pill text + release month/date)AGENTS.mdandCLAUDE.md(release guidance/current version notes)
- VERIFY: Check all docs files have correct version
- Run:
grep -r "belowjs@1\." docs/*.html README.md | grep -v "1.7.3"(should be empty)
- Run:
- Commit, tag, and push:
- Commit message:
release: X.Y.Z – summary - Tag:
vX.Y.Z
- Commit message:
- Login to npm (if needed):
npm login - Publish:
npm publish
- Use SemVer.
- Keep
CHANGELOG.mdconcise and chronological. - Mirror relevant entries in
docs/changelog.html(HTML, with “Latest Release” banner). - For features that alter public behavior (e.g., screenshot button), document:
- New config options
- New public methods
- Any required renderer flags
- Local examples (
examples/) import from/dist. - Docs examples (
docs/examples/) import from CDN with the current package version. - Script:
docs/copy-examples.jscopies and rewrites imports. - After bumping the version, rerun the script and verify CDN refs.
- Feature branches:
feature/<short-name> - Release branches (optional):
release/<major.minor.x> - Merge to
mainwith minimal conflict churn. Resolve examples carefully. - Commit messages should be scoped and descriptive.
- Keep preambles short when running commands; group related actions.
- Maintain an explicit plan/TODO if supported (e.g., Plan tool).
- Validate changes with build + lint; prefer small, verifiable steps.
- Ask before destructive actions (resets, large refactors).
- Don’t introduce new tools or formatters without user approval.
- Do: update both changelogs; bump README + docs CDN versions.
- Do: run
docs:examplesafter version bumps. - Don’t: fix unrelated issues or reformat unrelated files.
- Don’t: publish without successful build + lint.
src/– source modulesdist/– built JS/CSS bundlesexamples/– local dev examples (dist imports)docs/– static docs sitedocs/examples/– CDN-based examples (copied)docs/copy-examples.js– example copy + CDN rewrite scriptCHANGELOG.md– root changelogdocs/changelog.html– docs changelog
- Fixed: Comfort-mode teleport now uses Y-only aiming with cleaner landing visuals and suspended snap turn while the arc is active