You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/AGENTS.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,18 @@
3
3
## Safety & Process
4
4
-**Pull Requests Required**: Never push new features directly to the `main` branch. Always create a new branch and push your changes as a Pull Request (PR) for review.
5
5
-**Pre-PR Checks**: Run `npm run lint` and `npx vitest run` before opening any PR — don't open a PR with failing checks.
6
-
-**Preload/Types Contract**: Never modify `electron/preload.ts`or`src/types.d.ts`in isolation — these two files are a contract and must always be updated together.
7
-
-**Secrets Management**: Never store secrets, API keys, or credentials in code — API keys live in Electron's `safeStorage` only.
6
+
-**Preload/Types Contract**: IPC contract: `src/types.d.ts`↔`src/api.ts`via `invoke()`. Never modify these files in isolation.
7
+
-**Secrets Management**: Never add secrets to Rust source — use keyring crate via `commands/keychain.rs`.
8
8
9
9
## Code Conventions
10
10
-**Zustand Slices**: Zustand stores must use slice subscriptions (`state => state.x`), never subscribe to the whole store.
11
-
-**IPC Listeners**: All `ipcRenderer.on` registrations in `preload.ts` must return an unsubscribe function.
12
11
-**Lazy Loading**: Dynamic `import()` for any dependency over 1MB unpacked — check with `npx cost-of-modules` before adding new deps.
13
12
-**Timers**: No `setInterval` in renderer or main process — use targeted `setTimeout` chains or event-driven patterns.
14
13
15
-
## Electron-specific
16
-
-**Security Context**: `contextIsolation: true` and `nodeIntegration: false` are non-negotiable — never change these.
14
+
## Tauri & Rust
15
+
-**Security Context**: Follow Tauri's strict security model. Do not enable dangerous IPC scopes unless absolutely necessary.
17
16
-**IPC Types**: All new IPC channels must be declared in `src/types.d.ts` with proper types before use.
18
-
-**Power Management**: New background work in main process must handle `powerMonitor` suspend/resume events.
17
+
-**Asynchronous Rust**: Use `tauri::command(async)` for I/O bound operations in Rust to avoid blocking the main thread.
19
18
20
19
## Scope & Workflows
21
20
-**Focused PRs**: Don't refactor and add features in the same PR.
This document details the performance improvements made in V0.4.0. The primary goals were eliminating main-thread I/O blocking, reducing the initial JS parse time, and fixing React state-induced UI stutters.
8
+
This document details the performance improvements made in V0.5.0-beta by migrating from Electron to Tauri and Rust. The primary goals were drastically reducing the application size and background RAM usage by eliminating the embedded Node.js runtime and Chromium binaries.
0 commit comments