# AGENTS.md Guidance for AI agents working in this repository. Super Productivity is a todo and time-tracking app on Angular + Electron + Capacitor. ## Repo map Start with the [repository content map](docs/repository-map.md) (task keywords, code entry points, focused tests) and follow only the relevant links. Layer boundaries: [app map](src/app/README.md). Package ownership and checks: [packages](packages/README.md). Read by section, not whole: the long sync docs open with a **Sections** index and `ARCHITECTURE-DECISIONS.md` with a **Decisions** index; for any long doc, `rg -n '^#{1,3} ' ` gives line numbers for `sed -n`. For large source files, `rg -n` first, then read the range. ## Product principles Privacy is never traded away; the others are ranked, and the earlier one wins a conflict. In reviews, start with 2. 1. **Privacy & offline first:** no analytics, tracking or telemetry. Data stays local unless the user syncs it or turns on a feature that sends it (AI planning: off by default, own key). Core tasks and time tracking work offline; sync and integrations degrade gracefully. 2. **Avoid feature creep:** extend existing building blocks; new UI, settings and sync surface must make users faster. A personal deep-work tool, not team management, collaboration (#10830) or reporting. Surface the leaner alternative when scope outgrows the problem. 3. **Less noise, more depth:** no constant alerts, vanity dashboards, streaks, gamification or dopamine loops; attention-grabbing behavior ships off, reminders stay opt-in. No always-visible explanatory UI (status lines, "what syncs" labels, badges): explain at the moment it matters (an error, a tooltip, the owning setting). 4. **Fast & keyboard-first:** frequent actions are keyboard-reachable and take few steps (`Call Anna @tomorrow 3pm`, not a form); tighten existing flows rather than add surface. 5. **Adapt, don't impose:** one calm default; add a setting only when real workflows diverge, never to dodge a decision. ## Required reading per task - Styling → [`docs/styling-guide.md`](docs/styling-guide.md); user-facing functionality → [`docs/documentation-guide.md`](docs/documentation-guide.md) - Sync, op-log, vector clocks → [sync index](docs/sync-and-op-log/README.md), then only the relevant contracts. Effects/reducers/bulk dispatch touching synced state → [`contributor-sync-model.md`](docs/sync-and-op-log/contributor-sync-model.md). Judging whether a sync bug is real / how severe → [`sync-severity-triage.md`](docs/sync-and-op-log/sync-severity-triage.md) - E2E tests → [`e2e/AGENTS.md`](e2e/AGENTS.md); marketing videos → [`e2e/store-video/AGENTS.md`](e2e/store-video/AGENTS.md) - Load-bearing decisions → [`ARCHITECTURE-DECISIONS.md`](ARCHITECTURE-DECISIONS.md) - Designing a user-facing feature or writing its plan → [`docs/feature-review-guide.md`](docs/feature-review-guide.md) § Does it earn its place? and § Prior art - Reviewing a feature or PR → [`docs/feature-review-guide.md`](docs/feature-review-guide.md); editing a type in `packages/plugin-api/`, `packages/shared-schema/`, `packages/sync-core/`, `src/app/op-log/core/`, or a model a `MODEL_CONFIGS` slice persists → its § Long-term cost of a change ## Core commands **Run `npm run checkFile ` on every modified `.ts` or `.scss` file before reporting work as done** (pass all files in one call). If root ESLint ignores a file (e.g. in a package), use formatting plus that package's checks in [packages/README.md](packages/README.md#validation); an ignored file is not a lint pass. Regenerate generated files through their owner script. ```bash npm run checkFile # prettier + lint npm run prettier # multi-file format npm run lint # multi-file lint npm run typecheck # app incl. templates, specs, Electron (not worker/e2e/packages) npm test # shared packages + release tooling + Angular specs (Berlin, LA subset; CI: test:ci, full LA) npm run test:affected # Angular specs importing files changed vs master (Berlin + LA subset); `-- --list` to preview npm run test:file # single Angular spec; package tests use package scripts npm run test:electron # main-process tests are electron/*.test.cjs; a .spec.ts there never runs npm run e2e # browser E2E, excludes SuperSync/WebDAV npm run e2e:file -- --retries=0 # single non-sync E2E; add --grep "name" npm run e2e:supersync:file -- --retries=0 # starts and requires SuperSync npm run e2e:webdav:file -- --retries=0 # starts and requires WebDAV npm start # Electron dev npm run startFrontend # web dev, generates environment constants first npm run dist # validated Electron distribution for the host platform ``` **Wrap test, lint and E2E runs in `npm run quiet --