- Frontend-only work usually starts with
bun dev:web; it does not require backend services. - Backend, auth, MongoDB, Google sync, and SSE work require
a
compass.yamlat the repo root. Bootstrap with:
cp compass.example.yaml compass.yaml-
compass.yamlcontains secrets. Do not commit it. -
Avoid defaulting to
bun test; use the focused package test first. -
Formatting is handled by repo-local Codex and Cursor hooks after agent edits.
-
Use
bun lintand relevant verification before pushing or ending a session.
bun install
bun dev:web
bun dev:backend
bun dev:sync
bun test:core
bun test:sync
bun test:web
bun test:backend
bun test:scripts
bun type-check
bun lint
bun lint:fixValidation defaults:
- Core:
bun test:core - Sync:
bun test:sync - Web:
bun test:web - Backend:
bun test:backend - Scripts:
bun test:scripts - Shared contracts/cross-package behavior: affected package tests plus
bun type-check - Keep regression tests that protect real behavior. Remove temporary tests, scripts, debug hooks, or code added only to confirm a one-time hypothesis once that verification is complete.
- Use
bun run verifywhen you want the repo helper to choose checks from the git diff, but confirm its output before treating the task as done. - Use
bun run lintbefore pushing when the work is not docs-only.
- Docs index:
docs/README.md
Project workflows live in .agents/skills so supported agents share one source
of truth:
/ship: validate, review, open, merge, and verify a delivery/simplify: reduce complexity without changing behavior/a11y-audit: review changed UI for accessibility regressions/qa-test-staging: run the post-deploy staging confidence sweep/verify-change: select and run checks from the actual diff/local-dev-bootstrap: prepare the lightest viable local environment/google-sync-debug: trace OAuth, provider, job, webhook, and SSE failures/handoff: compact work for a fresh agent session
- Use aliases instead of deep relative imports:
@compass/backend->packages/backend/src@compass/core->packages/core/src@compass/scripts->packages/scripts/src@compass/sync->packages/sync/src@web/*->packages/web/src/*@core/*->packages/core/src/*
- Shared web/backend contracts belong in
packages/coreand should use Zod. - Web tests should use React Testing Library, semantic role/name/text queries,
and
user-event; avoid CSS selectors anddata-*locators. - New web styles should use Tailwind semantic colors from
packages/web/src/index.css, not raw colors likebg-blue-300. - Prefer canonical Tailwind scale utilities over arbitrary values when an
equivalent exists. Treat VS Code Tailwind IntelliSense
suggestCanonicalClasseswarnings as actionable cleanup before finishing changes. - Do not test login flows without the required backend setup.
- Keep React components in their own files.
- Do not add or use barrel files such as
index.ts/index.tsx. Import from the concrete source file instead, and remove nearby barrel files when it is safe to do so.
- Branches:
type/action[-issue-number], for examplefeature/add-form. - Commits: conventional, lower-case, present tense, for example
fix(web): handle disconnected google state.
At the start of any session in a fresh worktree — before assuming a
type-check/dev:* failure reflects a real code problem — read and follow
.agents/skills/local-dev-bootstrap/SKILL.md directly (it is not invocable
as a /local-dev-bootstrap slash command; .agents/skills/* isn't
registered with the Skill tool). It covers, in order: installing
dependencies unconditionally first (a fresh worktree with no node_modules
makes type-check fail with dozens of misleading Cannot find module
errors), trusting the port dev:ports actually prints rather than
.claude/launch.json's declared 9080/3000, and how dev:ports fills in a
missing sync: block on its own once mongo.uri is present — no manual
config authoring or asking the user for values needed.
Bun (bun@1.3.14) is the runtime and package manager. The environment is
defined in .cursor/environment.json: its install step installs Bun (fresh
VMs do not ship it) and runs bun install, so Bun is guaranteed on boot. The
VM's system node may be older than the engines field asks for, but
everything runs through Bun, so that mismatch is not a blocker.
compass.yamlat the repo root is required fordev:web,dev:backend, andcli— even frontend-onlydev:webaborts if the config still contains placeholders. The validator (packages/core/src/config/compass.config.ts) rejects any string containingREPLACE_WITH_(comments are ignored). This file is gitignored and holds secrets — never commit it.- Web:
bun run dev:webserves http://localhost:9080 and works fully in the anonymous / IndexedDB mode with no backend (create/edit events, shortcuts, etc.), which is the quickest way to exercise core functionality. For frontend-only work,cp compass.example.yaml compass.yamland replace the placeholders with any dummy non-placeholder strings. - Tests need no external services — the DB-backed suites (
test:backend,test:sync,test:scripts) spin up an in-memory MongoDB automatically, and SuperTokens/Google are mocked. Run the focused suite per AGENTS.md (bun test:core|web|backend|sync|scripts). - Playwright e2e/a11y (
bun test:e2e,bun test:a11y) are self-contained — they boot their own web server on port 9150 withe2e/compass.playwright.yaml(no real backend), but require the browser first:bunx playwright install chromium. Axe "incomplete" results are logged, not failures (seedocs/development/testing-playbook.md). - Backend: run
bash .cursor/bootstrap-backend.shonce to write a workingcompass.yamland install/start a single-node MongoDB replica set, thenbun run dev:backend(serves http://localhost:3000/api). The script is idempotent and readsSUPERTOKENS_URI,SUPERTOKENS_KEY,GOOGLE_CLIENT_ID, andGOOGLE_CLIENT_SECRETfrom the environment when set (otherwise dummy local auth values, Google disabled). Non-obvious: the backend uses transactions, so Mongo must be a replica set andmongo.urimust includereplicaSet=...— a standalonemongodwill not work.GET /api/healthreturning200 {"status":"ok"}confirms the backend is up and Mongo is reachable. - Auth/login and real Google Calendar sync are gated on external services not
provisioned by default: a SuperTokens instance and Google OAuth. Provide them
as environment secrets so
bootstrap-backend.shwires them intocompass.yaml. Without them the backend still runs and serves anonymous/health traffic, but do not attempt login flows (see the AGENTS.md rule) until those are configured.