Many agents work on this repo at once, each in a git worktree of its own, all on one machine.
The app is in its infancy and under heavy development. This means, we barely have users but ourselves. It is therefore important and timely that we always opt for the proper fixes and implementations. Rather going one step back and getting it right at the cost of compatibility than patching on patches.
Surface every failure: to the console and somewhere in the UI the user can see (a notice, the row it belongs to, the
pane). No silent catch(() => {}): swallowing an error needs a comment saying why that failure is expected and harmless.
User-visible changes go in CHANGELOG.md's top ## Unreleased section, in the same change: short bullets from the
user's point of view. Leave out implementation details, internal refactors, tests, docs and tooling. At release, the
notes are consolidated under the version (see docs/releasing.md). Put a plain upgrade warning first when something a
user has (a profile, an extension, a script) needs changing.
A note says what the user can now do or what's fixed, in a line: "Fix pasting into a terminal", not how it works or every way to reach it. Users' changes first, then extension authors'.
- Work in your own worktree. Never reset, stash or overwrite anything in the main checkout.
- Merge to
mainby rebasing onto the localmain, thengit -C <main checkout> merge --ff-only <your branch>(the main checkout is the first ingit worktree list). If that fails, rebase again and retry. - Don't push.
- Don't use
git stash: it's shared by every worktree of the repo, so a pop can take another agent's changes. Use a WIP commit instead.
- While working:
pnpm typecheck(incremental: quick after the first run) and only the tests related to what you changed:pnpm vitest related --run <files>, or a package's own (pnpm test packages/cli). - Before merging:
pnpm typecheckand the tests related to what you changed (pnpm vitest related --run <files>, or the packages you touched). Addpnpm smokewhen you changedapp/,packages/appor the protocol (packages/protocol). The fullpnpm testruns on main once per batch of merges (the chief of staff's check), not before every merge; run it yourself only for a change that reaches across many packages (a rename, an API change). Run checks withELECTRON_RUN_AS_NODEandELECTRON_RENDERER_URLunset (env -u ELECTRON_RUN_AS_NODE -u ELECTRON_RENDERER_URL pnpm smoke): agents started from the dev app inherit them, and they make Electron run as plain Node or load the dev server's page instead of the build. - After a rebase:
pnpm installifpnpm-lock.yamlchanged; thenpnpm typecheckand the related tests again. Run smoke again only if the rebase brought in changes underapp/orpackages/app, or to the protocol (packages/protocol). - Checking main itself: never in the main checkout. Every merge fast-forwards it and rewrites files under a
running check. Use a detached worktree of its own:
git worktree add --detach <dir> main, thenpnpm install.
pnpm test, pnpm typecheck, smoke, showcase and app/test/look.sh share a few slots across the whole machine
(scripts/check.ts; SUPEREGO_CHECK_SLOTS, default 2), so "waiting for a check slot…" and a short wait are normal.
Each is stopped if it runs too long: smoke, showcase and look after 8 minutes (SUPEREGO_SMOKE_TIMEOUT,
SUPEREGO_SHOWCASE_TIMEOUT, in seconds), the rest after 20 (SUPEREGO_CHECK_TIMEOUT). Smoke, showcase and look build
the app first only when its sources changed. A new package or extension also goes in the root tsconfig.json's
references, or pnpm typecheck skips it.
Give any other long-running command a timeout of its own. Never use ImageMagick's compare -subimage-search on
screenshots: it can run for hours.