ascii-chat-web-deploy
Skill203 starsChanged 8 days agoMITView on GitHub
Deploy or repair the three ascii-chat Vercel websites and their Cloudflare DNS. Use for releases to ascii-chat.com, web.ascii-chat.com, or discovery.ascii-chat.com; not for the ACDS server itself.
- Commits and pushes
In this repository11 other files it gives its agents.
- web/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ascii-chat-c-developmentSkill
- ascii-chat-cli-releaseSkill
- ascii-chat-cross-platform-development-and-or-testingSkill
- ascii-chat-documentationSkill
- ascii-chat-mcp-devSkill
- ascii-chat-python-developmentSkill
- ascii-chat-testingSkill
- ascii-chat-wasm-developmentSkill
- sentry-commit-messagesSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when publishing or diagnosing the public ascii-chat websites.
- Distinctive: line 34
Run each merge only when needed.
- Very specific: line 71
If build/web/CMakeCache.txt already says Release, build all browser targets through the shared parent target.
- Distinctive: line 77
If the nested browser configuration is absent or needs its build type changed, configure it explicitly with Emscripten and Ninja without …
- Very specific: line 89
Commit regenerated mirror.js, mirror.wasm, client.js, client.wasm, and manifest.json only in web/web/src/wasm/dist/.
- Very specific: line 97
Never alter discovery-service.ascii-chat.com, stun.ascii-chat.com, or turn.ascii-chat.com while deploying the discovery website.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ascii-chat Web Deploy
Use this skill when publishing or diagnosing the public ascii-chat websites.
Release topology
| Site | Vercel project | Root directory | Release branch |
ascii-chat.com | ascii-chat-www | web/www | deploy-web-www |
web.ascii-chat.com | ascii-chat-web | web/web | deploy-web-web |
discovery.ascii-chat.com | ascii-chat-discovery | web/discovery | deploy-web-discovery |
Each project is intentionally disconnected from Vercel's Git integration. Do not reconnect it or use ordinary Git pushes as deployments. The repository GitHub Actions workflows .github/workflows/deploy-web-{www,web,discovery}.yml use pnpm and the VERCEL_TOKEN GitHub secret to make the sole production deployment when its matching release branch is pushed.
Release procedure
Preserve a dirty checkout. Before every release, reconcile all three release branches into
masterfrom a clean worktree. A release branch may contain direct agent work, so never assumemasteralready contains it. Merge each branch that is not already an ancestor oforigin/master, resolve and verify any conflicts, then pushmaster:git fetch origin git switch master git merge --ff-only origin/master git merge origin/deploy-web-www git merge origin/deploy-web-web git merge origin/deploy-web-discovery git push origin HEAD:masterRun each merge only when needed; preserve all release-branch commits rather than replacing the branch or force-pushing it.
- Validate the browser artifacts using the conditional Release-build procedure below, commit any regenerated canonical artifacts, and push
master. Do not advance release branches until validation passes. From the reconciled
master, bring the intended remote commit to the matching release branch:git fetch origin git push origin origin/master:deploy-web-<site>Replace
<site>withwww,web, ordiscovery. Do not force-push a release branch.- Confirm the matching GitHub Actions run succeeds before treating the release as deployed. The deployment must use pnpm; do not substitute npm, Docker, or a manual Vercel Git deployment.
- Open the public URL directly and take a fresh screenshot/accessibility check. For the web client, test direct deep links such as
/mirror,/client, and/discovery, not just in-app navigation.
Build and routing notes
web/webis a Vite single-page app. Itsvercel.jsonrewrite is required so direct client routes do not receive Vercel's 404 page. Keep the rewrite when modifying deployment configuration.web/discoveryrequiresSSH_PUBLIC_KEYandGPG_PUBLIC_KEYVercel environment variables in both Production and Preview. Set them to the complete SSH public-key line and armored GPG public-key block, respectively; fingerprints are derived display values and are not environment variables.scripts/generate-keys.shwrites them topublic/key.pubandpublic/key.gpg. Its Vercel build command must bebash scripts/generate-keys.sh && pnpm run vite:build && cp dist/index.html dist/404.html. Avoid the fullpnpm run buildin Vercel: its formatter can inspect Vercel-generated.vercelfiles and fail the build.web/www/api/session-strings.tsis the canonical Vercel function:https://www.ascii-chat.com/api/session-strings?count=<1-20>. It uses the shared C-derived word lists and Web Crypto rejection sampling. Both the www and discovery pages use this endpoint in production; keep its discovery-origin CORS response and do not replace it with a downloaded native binary or cache its responses.web/discoveryendpoint configuration is shared by the page and its status functions. Set these Vercel Production environment variables when hosting it elsewhere; omit any of them to use the bundled official defaults:Variable Format Current default DISCOVERY_WEBRTC_SERVERSComma-separated ws://orwss://URLs; barehost:portdefaults towssexcept port 80, which defaults tows.wss://discovery-service.ascii-chat.com:443DISCOVERY_STUN_SERVERSComma-separated stun:host:portURLs. Whitespace around commas is ignored; barehost:portremains accepted for compatibility.stun:stun.ascii-chat.com:3478,stun:stun.l.google.com:19302DISCOVERY_TURN_SERVERSComma-separated turn:host:portURLs. Whitespace around commas is ignored; barehost:portremains accepted for compatibility.turn:turn.ascii-chat.com:3478STUN and TURN default to port
3478over UDP when omitted. Usestuns:host[:port]orturns:host[:port]for TLS; status functions probe those endpoints over TLS and default omitted ports to5349. These non-secret values are exposed to the frontend at Vite build time, and Vercel functions use the same values at runtime.DISCOVERY_STATUS_TURN_USERNAMEandDISCOVERY_STATUS_TURN_PASSWORDremain server-only credentials for authenticated TURN probes.
Conditional WASM Release builds
- Compile
mirror-webandclient-weband generate their JavaScript glue only when needed: canonical artifacts are missing, source or artifact hash validation fails, relevant compiler/build settings changed, or their Release-build provenance cannot be established. A frontend-only, documentation, or skill change does not by itself require regenerating WASM or its JavaScript. Never rewrite the manifest to make stale binaries appear current. - First run
vp exec node web/web/scripts/wasm-build.mjs --publish-onlyfrom the repository root. This checks the current source hash and every canonical artifact hash, then copies the verified assets to runtime URLs; it does not compile WASM or generate JavaScript glue. Reuse passing artifacts when their Release provenance is known. - When regeneration is necessary, use the main worktree and
./build/, with the effective WASM CMake build type set to Release. Keep the main worktree onmaster; usecodex/branches for separate agent worktrees. Dependency build/install directories are separated by build type, so a separatebuild_release/tree is unnecessary. Preserve the native configuration: a native Debug cache inbuild/can drive the independent Release WASM configuration inbuild/web/. Verify the nested cache rather than inferring the WASM build type from the native cache or directory name. If
build/web/CMakeCache.txtalready saysRelease, build all browser targets through the shared parent target. Parent WASM targets share a directory lock, including across separate build commands, so they cannot run competing Ninja processes inbuild/web/:cmake --build build --target webIf the nested browser configuration is absent or needs its build type changed, configure it explicitly with Emscripten and Ninja without replacing the native cache:
emcmake cmake -S src/web -B build/web -G Ninja -DCMAKE_BUILD_TYPE=Release -DPARENT_CMAKE_BINARY_DIR="<absolute-repository-path>/build" cmake --build build/web --config Release --target mirror-web client-webThe parent build must contain
generated/data/fonts/default.candmatrix_resurrected.c; reuse verified generated fonts or generate them with the repository font targets first. On the current Windows Emscripten SDK,-DCMAKE_EXE_LINKER_FLAGS=-sMALLOC=emmallocavoids the bundled dlmalloc/Clang alias incompatibility. Use-DFETCHCONTENT_FULLY_DISCONNECTED=ONonly when the dependency cache is already populated.Confirm
CMAKE_BUILD_TYPE:STRING=Releasein the effective WASMCMakeCache.txtbefore publishing. Never publish Debug artifacts. CMake's incremental build determines which objects and generated glue actually need regeneration.- After the build succeeds, publish its outputs using
ASCII_CHAT_WASM_ARTIFACT_DIR=build/web vp exec node web/web/scripts/wasm-build.mjsfrom the repository root (in PowerShell, set$env:ASCII_CHAT_WASM_ARTIFACT_DIR = 'build/web'first). This copies the completed outputs into the canonical artifact directory without invoking another build. Use this option only after verifying that both Release targets built successfully from the current sources. Re-run--publish-onlyafterward to verify the final source/artifact hashes. - Commit regenerated
mirror.js,mirror.wasm,client.js,client.wasm, andmanifest.jsononly inweb/web/src/wasm/dist/.web/web/public/wasm/contains ignored runtime copies; do not force-add them. Record the Release configuration and build directory in the artifact commit message so subsequent deployments can establish provenance and skip unnecessary compilation. - For local installation, checks, tests, and builds, follow
web/AGENTS.mdand use thevpwrappers. GitHub deployment workflows use pnpm.
Domains and DNS
Cloudflare manages ascii-chat.com DNS. Before changing records, obtain explicit confirmation naming the target hostname and the records being replaced.
- Never alter
discovery-service.ascii-chat.com,stun.ascii-chat.com, orturn.ascii-chat.comwhile deploying the discovery website. Those are service endpoints, not thediscovery.ascii-chat.comfrontend.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

