feat: Claude Code web-readiness (AGENTS.md + dep bootstrap + run-tests skill) - #86
Conversation
… run-tests skill) - AGENTS.md: repo context (TS/Zellij/vitest) — auto-loads on web - .claude/settings.json + .claude/bootstrap.sh: idempotent POSIX npm ci on SessionStart - .claude/skills/run-tests: vitest + tsc skill — auto-loads on web - README: Claude Code web section No localhost/Windows refs in config. Part of the 2026-07 web-readiness pass (.github PR #12).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 968ae0538c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| if [ -f package.json ] && [ ! -d node_modules ]; then | ||
| if [ -f package-lock.json ]; then | ||
| npm ci --no-audit --no-fund --ignore-scripts || npm install --no-audit --no-fund --ignore-scripts || true |
There was a problem hiding this comment.
Run the native install scripts needed by better-sqlite3
In a fresh Claude Code web session this creates a broken node_modules: --ignore-scripts suppresses dependency install scripts (npm ci docs: https://docs.npmjs.com/cli/v10/commands/npm-ci#ignore-scripts), but this repo's lockfile marks better-sqlite3 as requiring an install script with prebuild-install (package-lock.json:1424-1430). Since src/index.ts statically imports commands that eventually import src/core/queue.ts and its top-level better-sqlite3 import, the CLI/tests can fail before doing any work unless the native binding has been downloaded/built. Please allow that trusted script or run an explicit rebuild after the hardened install.
Useful? React with 👍 / 👎.
|
|
||
| if [ -f package.json ] && [ ! -d node_modules ]; then | ||
| if [ -f package-lock.json ]; then | ||
| npm ci --no-audit --no-fund --ignore-scripts || npm install --no-audit --no-fund --ignore-scripts || true |
There was a problem hiding this comment.
Keep the startup hook from rewriting locks
When npm ci fails because package.json and package-lock.json are out of sync, this SessionStart hook immediately falls back to npm install. The npm ci docs state that ci exits on lock/package mismatches and never writes package files (https://docs.npmjs.com/cli/v10/commands/npm-ci), while npm install can update package-lock.json; merely opening Claude Code on such a branch can therefore create or hide lockfile changes before the user asks for edits. For a locked repo, the hook should report/fail the frozen install instead of falling back to a non-frozen one.
Useful? React with 👍 / 👎.
| Run tests + typecheck and report concisely. | ||
|
|
||
| 1. Ensure deps are present (SessionStart bootstrap runs `npm ci`; else run it). | ||
| 2. Tests: `npm test` (→ `vitest run`); single file `npx vitest run <path>`. Typecheck/build: `npm run build` (→ `tsc`). |
There was a problem hiding this comment.
Typecheck tests in the run-tests skill
When this skill is used after editing tests, npm run build only runs tsc with tsconfig.json, whose include is src/**/*, so test-only type errors are skipped even though package.json already defines npm run typecheck with tsconfig.test.json to include tests/**/*. This can make the skill report a clean verification that CI's typecheck would reject; have it run npm run typecheck (or npm run check) in addition to the build.
Useful? React with 👍 / 👎.
Makes the flagship ccmux usable from Claude Code on the web:
AGENTS.mdcontext, a SessionStartnpm cibootstrap (POSIX, idempotent, no localhost/Windows in config), and arun-testsskill (vitest + tsc). ccmux's own runtime (Zellij/n8n/Obsidian) stays local — cloud is for reading/editing/testing code. Part of the 2026-07 web-readiness pass (see.githubPR #12).