@@ -29,9 +29,11 @@ behind human approval.
2929 ` workflows/ ` . Root-bucket modules are operator-installed and may declare
3030 routes, migrations, credentials, and grants; sandboxed installables use
3131 Interchange's native contracts and never get root-bucket powers.
32- - ** No fallbacks, no spread-assembly.** Cut over cleanly — never leave a
33- legacy path beside a new one. Build config and manifest objects as explicit
34- literals, never assembled by spreading.
32+ - ** No fallbacks.** Cut over cleanly — never leave a legacy path beside a
33+ new one. Config and manifest objects are explicit literals; the one
34+ exception is an optional key under ` exactOptionalPropertyTypes ` (see
35+ below), where ` ...(x !== undefined ? { k: x } : {}) ` is the only correct
36+ way to omit it and is not a fallback.
3537- ** Self-documenting code over comments.** Name things so the code explains
3638 itself; a comment is for the rare "why" the code cannot express, never a
3739 restatement of what it does.
@@ -43,11 +45,13 @@ behind human approval.
4345 composition lives in this repo.
4446- ** This repo is public.** No secrets or credentials, ever — ` .env.example `
4547 is the only tracked env file. Anything sensitive or on-the-fence (client
46- names, internal context) goes in Linear, not in commits, PRs, or docs.
48+ names, internal context, infra/deploy rulings) goes in Linear, not in
49+ commits, PRs, or docs.
4750
4851## Working conventions
4952
50- - ` bun run check ` (typecheck, lint, test) must pass before every commit.
53+ - ` bun run check ` (typecheck, lint, test, structural checks) must pass
54+ before every commit.
5155- Commit sequence per change: tests first ("Add tests for X"), then
5256 implementation ("X: what changed"), then docs ("Update docs: X"). One
5357 logical change per commit; commit messages are written for a public
@@ -57,16 +61,27 @@ behind human approval.
5761 line coverage floor: 80%. Unit tests for pure modules sit next to the
5862 source they cover (` src/**/*.test.ts ` ); multi-module / DOM / composition
5963 suites stay under a package ` test/ ` tree (or top-level e2e).
60- - Deployment is explicit via Pulumi (Railway); CI runs tests only — nothing
61- auto-deploys on main.
6264- A fresh worktree has no ` node_modules ` symlinks until ` bun install ` runs.
6365 To check whether a workspace package exists, look in ` packages/ ` , not
6466 ` node_modules ` — an absent ` node_modules ` entry means "not installed
6567 yet," not "doesn't exist."
68+ - ` scripts/checks/* ` are heuristics over source text, not proof — they can
69+ and do false-positive (install artifacts read as vendored trees, comments
70+ read as imports, class names read as user copy). A check failure is a
71+ claim to go verify, not a verdict.
72+ - CI green is not "it works." ` scripts/e2e/browser/walkthrough.ts ` exists
73+ because API-only e2e suites kept passing while the real UI broke — drive
74+ the app through it (or by hand) before calling a UI change done.
75+ - Deployment mechanics (tooling, target, where infra config lives) are not
76+ settled enough to state here — see IMPLEMENTATION.md's Deployment
77+ section and its Open Questions before assuming anything about how or
78+ where this deploys.
6679
6780## Conventions a check enforces
6881
69- Prefer these over remembering the rule; each is backed by a `bun run
82+ A rule a check enforces has zero violations; a rule stated only in prose
83+ drifts the moment it's inconvenient — everything above this section is
84+ prose. Prefer these over remembering the rule; each is backed by a `bun run
7085check:* ` script, so a violation fails CI rather than waiting for review.
7186
7287- Report every caught error through ` reportError ` from
@@ -89,18 +104,25 @@ check:*` script, so a violation fails CI rather than waiting for review.
89104- ` tsconfig.base.json ` sets ` exactOptionalPropertyTypes: true ` : an absent
90105 key and an explicit ` { foo: undefined } ` are different types. Assigning
91106 ` undefined ` to an optional field the compiler expects omitted is a
92- recurring CI break — omit the key instead.
107+ recurring CI break — omit the key instead (see the spread-literal
108+ exception under Ground rules).
109+
110+ Every other rule in this file is unchecked prose. If you find yourself
111+ relying on one under time pressure, that's a sign it should become a
112+ ` check:* ` script — ticket it instead of trusting memory.
93113
94114## Docs map
95115
96116- [ README.md] ( README.md ) — quickstart and repo layout
97117- [ PRODUCT.md] ( PRODUCT.md ) — what Workbench is and why
98118- [ ARCHITECTURE.md] ( ARCHITECTURE.md ) — system structure
99- - [ IMPLEMENTATION.md] ( IMPLEMENTATION.md ) — concrete stack
119+ - [ IMPLEMENTATION.md] ( IMPLEMENTATION.md ) — concrete stack, deployment, open
120+ questions
100121- [ CONTRIBUTING.md] ( CONTRIBUTING.md ) — contribution flow and CLA
101122- [ LICENSE.md] ( LICENSE.md ) — GPLv2 with AI Exception
102123- [ SECURITY.md] ( SECURITY.md ) — how to report vulnerabilities
103124- [ VENDORED.md] ( VENDORED.md ) — the vendoring ledger and its rules
104125- [ DESIGN.md] ( DESIGN.md ) — the UI design system canon; a screen that
105126 disagrees with it is wrong until a review changes the doc
106- - ` docs/ ` — architecture and design docs, added as the system grows
127+ - ` docs/ ` — architecture and design docs, added as the system grows;
128+ owner rulings and internal decisions belong in Linear, not a doc here
0 commit comments