docs/PLAN.md is the spec: no design judgment; anything unclear is a question in the PR, not a guess.
- Public API: typed (no
any/interface{}), explicit, minimal; never export a symbol only a test uses. - One intent, one path: the old path is deleted in the same change. No silent fallback,
TODO, commented code or stub. - Fail at compile time, else a loud diagnostic — never silently. Zero values deny.
- A defect in a dependency is reported, never wrapped or patched here.
- No string literals in logic: named constants. The same logic never lives in two repos: import the package the plan names; if you find an existing one the plan does not name that already does what you are about to write, say so in the PR instead of writing it.
cmd/*/main.go: parse flags, inject, print/exit only. stdout = data, stderr = logs, exit codes are the contract.- WASM code:
webtyp/fmt,webtyp/time,webtyp/jsoninstead of stdlib; nomap;dom.Elementembedded by value. css.go,svg.go,js.go,html.gocarry//go:build !wasm; nossr.go, nofront.go.- Build tags:
wasm/!wasmonly when the API does not exist on that platform;browser/!browserwhen the file belongs to another binary One main per folder, no destination tag:web/browser/main.go→web/public/browser.wasm,web/server/main.go→web/server/server,web/edge/main.go→web/edge/edge.wasm. - Code and keys in English; UI text is
lang.Text, translations live inlang.json. - Tests cover behaviour and domain rules, never the look (CSS, colours, markup order, class strings). In
tests/(external package), real stack with fakes only at the edge; rungotest. - Docs (
README.md,docs/*) updated with the API; permanent docs never linkdocs/PLAN.md. - Before the PR:
git diff --stat mainlists every file of the plan's stages, and nothing the plan did not order is deleted.
Working notes for AI agents operating in this repository. End-user docs: README.md.
The developer CLIs of the webtyp ecosystem (gotest, gopush, gonew, codejob, …) and the
library behind them. Commands live in cmd/*; every decision lives in the library.
It runs on the developer's machine and in CI. os, os/exec, path/filepath, strings are
correct here — do not replace them with webtyp.com/* browser packages.
go install ./cmd/gotest # this repo builds its own test runner
gotestcmd/*/main.goonly parses arguments, injects dependencies and maps errors to exit codes; every conditional is an exported library function.- Every repeated string (env keys, file names, prefixes, flags) is a named constant.
- Tests live in
tests/(nevertest/). A root-level test is allowed only with a top-of-file comment justifying the unexported identifier it needs. Never export a symbol so a test can reach it. Tests never touch the real home, real git remotes or the network: build trees undert.TempDir()and use the fake runners intests/. - Reuse before writing. Module discovery,
*.code-workspaceroot detection and walking thego.modfiles of a workspace belong towebtyp.com/modfind: call it, never re-implement it here.