- Runtime: Bun — always use
buninstead ofnpx/node - Dev server:
bun run dev(port 3000, Vite SSR, assume it is running, ask user to run it if down)- Renderer: Don't manually run
build:renderer— it runs in watch mode alongside dev - Webviews: Don't manually run
build:webview— it runs in watch mode alongside dev
- Renderer: Don't manually run
- Production Build:
bun run build && bun startruns on port 3000
- Lint: Run
bun lintafter making changes. Fix errors before moving on. - Typecheck: Run
bun typecheckafter making changes. Zero errors policy. - Smoke test: After significant changes, use any available browser MCP to open
http://localhost:3000and check console messages for errors. effect-devtuimcp should be available to capture observability data from Effect apps
Bun + Effect Platform backend. Look at server/httpapi/ for routes and server/layers/ for service layers. SSR uses Effect HttpApi contracts. Kysely for DB queries with withAuthContext() for RLS.
Boot sequence starts at src/entry.ts → src/loader.ts. VSCode service overrides in src/setup.*.ts. Feature modules live in src/features/ — each is an Effect Layer (auth, notebook, playground, serverSync, pglite, etc.).
- Use Effect for all code — services, layers, error handling
- All error handling should be handled through Effect so runtime errors can be traced through the type system
- Use Effect Schema (
import * as S from "effect/Schema") for runtime any and all runtime validation - Never
JSON.parse(input)useS.parseJson(schema)(input) - Use Kysely query builder for DB queries (never raw SQL except for Postgres function calls with named args)
- Effect information can be found in through
effect-solutionscli and from reading~/.local/share/effect-solutions/effect - You can and should immediately refactor any non-Effect code to use best practices
This project uses prog for cross-session task management. Do NOT use internal planning tools — use prog for all task tracking.
Run prog prime for workflow context
Quick reference:
prog ready -p pg.garden # Find unblocked work
prog add "Title" -p pg.garden # Create task
prog start <id> # Claim work
prog log <id> "msg" # Log progress
prog done <id> # Complete work
MUST use -p pg.garden for all commands that dont have an
For full workflow: prog prime
When you believe changes are complete, mark the current prog task as done and prompt the user with a commit message to describe changes.