Contributing
Fixes and small features are welcome; open an issue first for anything large.
Run the checks
Node 24 or newer and the pnpm release pinned by packageManager in package.json (corepack enable pnpm installs it). From a clone:
pnpm install
pnpm typecheck # server, client and tests
pnpm exec vitest run # the whole suite, about 2 minutes
pnpm build # client (vite) and server (tsc) into dist/All three must pass. pnpm check:pack packs the project and runs it in plain Node; it needs the npm registry and rebuilds dist, so do not run it while something uses dist.
Docs are VitePress, from docs/ (pages listed in .vitepress/config.mts): pnpm docs:dev serves them with live reload, pnpm docs:build checks them (a dead link fails the build). CI runs it on every pull request. The site (gonogo.ulm0.com) is published with a release, from the v* tag, not on every merge: a merged docs change shows up with the next release. To publish a docs-only fix sooner, run the Docs workflow by hand (Actions, Run workflow) with a tag or branch as the ref; empty means the newest release tag.
Where things are
src/shared/protocol.ts: every shared type.src/server/: the hub (hub.ts, pure logic, tested with a fake clock), the web server (web.ts), the launcher and the MCP server.src/client/: React 19 and Vite. Logic that tests need lives in plain.tsfiles (the test config has no JSX).docs/contract.md: the design and its revision log.docs/backlog.md: what is planned.docs/<name>-spec.md: one per feature.
A new feature needs tests (unit and routes), a spec, a page in docs/features/ with its sidebar line in .vitepress/config.mts, and a line in the revision log of docs/contract.md. Keep English plain and short. Mark a known limit with shortcut: <the limit>, <when to upgrade>. Add no dependency without a reason. pnpm runs no dependency build script unless pnpm.onlyBuiltDependencies in package.json names the package.
Dependency updates
Renovate opens an update only once the release is a day old (minimumReleaseAge), and internalChecksFilter: strict hides a branch whose release is still too young, so no pull request exists to merge early. A security fix does not wait. pnpm can hold the same line on install: if it refuses a version that is younger than its minimumReleaseAge, name the package in minimumReleaseAgeExclude in a pnpm-workspace.yaml at the root, for example minimumReleaseAgeExclude: ["vitest@5.1.1"], and remove the line once the release is old enough. Pin an exact version there, never a whole package.
The stand-in agent
test/fake-claude.mjs stands in for claude: it checks the arguments and the generated settings.json and mcp.json, draws a screen, posts the same hooks and calls the same MCP tools. test/e2e.test.ts runs the real server with it (GONOGO_AGENT_CMD) end to end, without a model or account. When you add or rename a tool or change mcp.json, update its ALLOWED_TOOLS and checks.
It proves gonogo's side only. A change to how a real CLI starts, reports state or receives mail needs a run of that CLI.
The browser smoke
browser/smoke.spec.ts drives Chromium (Playwright) through the built server with the stand-in agent: setup and login with a second factor (real form posts, so the browser sends its own Origin), no console or CSP errors, the cookie flags and Content-Security-Policy headers the browser got, styles and fonts applied, a room whose link lamp comes up and whose console draws text, the service worker, the Flight Rules blocks (Knowledge with its switch on, room rules, the closing checklist template, skills) and a mission with its closing checklist. It exists because a browser found bugs that Node clients and jsdom cannot. It spends nothing. It checks a few exact design values (the link lamp's 10.5px font, the logo's 26px height) as a canary for a broken style sheet: change them in the spec together with the design.
pnpm build
pnpm exec playwright install --with-deps chromium # once, about 150 MB
pnpm exec playwright testCI runs it (.github/workflows/browser.yml) on pull requests that touch src/client, the auth and web server files, any .css, public/sw.js or the Vite config, by hand, and before a release publishes. A failure uploads a screenshot and a trace as an artifact. .github/workflows/browsers.yml runs the same spec on Firefox and WebKit on those pull requests (not part of the release gate; locally PW_BROWSERS=firefox,webkit pnpm exec playwright test browser/smoke.spec.ts). WebKit runs with service workers blocked: Playwright's WebKit hangs the page once one is installed.
The real smoke
pnpm build
pnpm smoke:real --spendIt runs the built server with the real claude (haiku): hires an agent, passes a few messages and a go/no-go poll, stops everything. It spends subscription tokens (two agents, a few short turns; not measured). It refuses to run without --spend, is not part of pnpm test, and is run by a person, not CI. It needs a signed-in claude and a folder Claude Code already trusts (--dir). Run it before a release and after changing the launcher, hooks, terminal rules or message delivery.
Saved state
Every JSON file under the home holds a version. To change a format, add a step to its entry in src/server/migrate.ts, update the store, and add a fixture and test in test/migrate.test.ts.
Secrets
Never put a token, webhook secret or credential in a test, fixture, log line or document. Tests never call an outside service: mock fetch or start a local server.
Development
The commands and files below belong to the source repository: scripts/, docs/, test/, CONTRIBUTING.md and the Dockerfile are not part of the package tarball. CONTRIBUTING.md says how to run the checks, what the stand-in agent is and what the real smoke costs.
pnpm build # client (vite) and server (tsc) into dist/
pnpm test # vitest: unit tests, and an end-to-end test with a stand-in agent
pnpm typecheck
pnpm check:pack # packs the project and runs the packed package in plain Node
pnpm smoke:real --spend # real claude on haiku; spends subscription tokenscheck:pack runs pnpm pack (whose prepack rebuilds dist), so do not run it while something uses dist. smoke:real needs pnpm build first, a signed-in claude, and a folder Claude Code already trusts (this project by default, or --dir <folder>).
To try the tarball by hand, run pnpm with an empty user config and a temporary HOME, so your own ~/.npmrc (pnpm reads it too, and it may hold a registry token) is never read or sent. Run the tarball with pnpm dlx file:<absolute path>. The tarball carries no lock file: its own dependencies are pinned exactly in package.json, theirs resolve at install time.
tmp=$(mktemp -d) && : > "$tmp/npmrc"
env HOME="$tmp" NPM_CONFIG_USERCONFIG="$tmp/npmrc" pnpm pack --pack-destination "$tmp"
env HOME="$tmp" NPM_CONFIG_USERCONFIG="$tmp/npmrc" pnpm dlx "file:$(ls "$tmp"/*.tgz)" --port 0File names. Never add two files whose names differ only by case (Missions.tsx beside missions.ts): macOS and Windows disks cannot tell them apart and an import finds the wrong one. A component's helpers are named <name>Model.ts (missionsModel.ts). test/case-collisions.test.ts fails on a pair.
Releasing
The npm package is @ulm0/gonogo (the unscoped gonogo on npm is another project); the command it installs is gonogo. .github/workflows/release.yml publishes it, with provenance, and creates the GitHub Release with generated notes. It runs on a pushed v* tag, or by hand (Actions > Release > Run workflow) with the name of a tag that already exists. It checks out that tag, runs the checks above, and stops when the tag is not v plus the version of package.json or the package name is not @ulm0/gonogo. A version like 1.2.0-rc.1 goes to the npm dist-tag next. The same tag also makes .github/workflows/image.yml push the image.
The CHANGELOG. A pull request does not edit CHANGELOG.md (every merged one would conflict with every other open one; CI fails it): it adds changes/<branch>.md with its bullet (changes/README.md says how). To release: run pnpm changelog:release <version> <date> "<intro>", which folds the fragments under a new heading and deletes them, put the new version in package.json, merge to main, then tag that commit and push the tag (git tag v<version> && git push origin v<version>).
Publishing uses npm trusted publishing (OIDC): on npmjs.com, @ulm0/gonogo > Settings > Trusted Publisher trusts this repository's workflow release.yml, so the publish job needs only id-token: write and no token lives in the repository. The first release, 0.1.1, went out with a short-lived granular token; it is no longer used. A tag whose package.json is not @ulm0/gonogo (such as v0.1.0) stops at the name check.
The tarball carries no lock file (pnpm reads none from a package): gonogo's own dependencies are pinned exactly in package.json, and theirs resolve at install time. The Docker image installs from pnpm-lock.yaml instead.