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, sequential, minimal; no generics ([T any]) orreflectwithout benchmarked allocation/performance justification and owner approval; 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 (imported without alias asfmt,time,json— nevertinytime); 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 an app's file belongs to another binary; a library carries no destination tag (the linker drops what a binary never calls). 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. Comments and docs: English inwebtyp/*; inveltylabs/*every README,docs/*file, diagram and code comment is in Spanish, written for a reader with little technical background, and each exported symbol's comment shows a short usage example. - A translation key is reused, never duplicated as a near-identical phrase (
"not a valid integer"+"not a valid decimal number"repeats"not a valid"three ways instead of composing it once) — every library ships to WASM/TinyGo, so each unreused phrase is dictionary rows AND binary bytes, in every consumer, forever. A token that doesn't need translating (a kind/type name likeint) is passed as data (a variable), never as a string literal — a literal becomes a dictionary key whether or not it needed one. - 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.
- Pure compiler: translates
storage.Query(DML) andddl.Stmt(DDL) into SQLite SQL. No connections, no execution —webtyp/sqliteis the driver. Do not add one here. tests/is its own Go module (webtyp.com/sqlt/tests,replace webtyp.com/sqlt => ../) because it needs the SQLite driver (modernc.org/sqlite) the library must not depend on. Bump a dependency in bothgo.modfiles.tests/conformance_test.goholds a test-onlysqlConnover*sql.DB; it must follow the samestoragecontract as a real driver (NULL scans as the zero value viastorage.NullSafe).- Identifiers are not quoted (existing house style in
translate.go); keep it consistent.