This guide defines how to implement changes in this repository. For more context on specific guides, see:
| Guide | Purpose |
|---|---|
| docs/STYLE_GUIDE.md | User-visible copy and documentation: English-only, tone, terminology. |
| .agents/skills/nosuckshell_ops/SKILL.md | Operations: Common commands and validation for agentic automation. |
- Monorepo root: npm scripts delegate to
apps/desktop. - Desktop app:
apps/desktop— React + Vite + TypeScript frontend, Tauri Rust backend inapps/desktop/src-tauri.
- Keep changes focused on the problem or feature; avoid drive-by refactors or unrelated formatting churn in the same PR.
- Add or update tests when behavior changes or new logic deserves coverage.
- Match existing patterns in nearby files (naming, file layout, hooks, IPC boundaries).
- Compiler:
tsconfig.jsonuses strict mode,noUnusedLocals, andnoUnusedParameters— fix errors before merge. - Prefer small, composable components; colocate state where it is used.
- Centralize Tauri IPC behind a thin wrapper (see
src/tauri-api.ts) and invoke with the same command names as Rust#[tauri::command]handlers. - New commands: add the Rust handler, register it in the Tauri builder, expose typed helpers in
tauri-api.ts, and handle errors in the UI consistently.
- Edition: Rust 2024 as declared in
Cargo.toml. - Identity store schema:
ENTITY_STORE_SCHEMA_VERSIONinstore_models.rsmust stay in sync withENTITY_STORE_SCHEMA_VERSIONinapps/desktop/src/types.tswhen bumping persisted JSON. - Use serde for structured payloads; prefer explicit errors (
thiserror/anyhow) as used elsewhere in the crate. - Security-sensitive paths (crypto, file I/O, SSH): follow SECURITY.md and avoid logging secrets.
From apps/desktop:
npm test
npm run build
cd src-tauri
cargo test
cargo check- Vitest for unit/integration tests in the frontend.
- Playwright for e2e and screenshot generation (see CONTRIBUTING.md and docs/media/screenshots/README.md).
There is no ESLint/Prettier in the repo today; tsc (via npm run build) and cargo check are the baseline. If formatters are added later, follow the repo configuration.
A validation script is available at .agents/skills/nosuckshell_ops/scripts/validate_project.sh to run these checks in one go.
Releases: Before tagging, follow the Release preparation checklist in .agents/skills/nosuckshell_ops/SKILL.md (aligned versions, changelog, lockfiles, docs).
- Read STYLE_GUIDE.md and this CODE_GUIDE before large edits.
- Do not commit without explicit human approval; propose changes and wait for review.
- If the real codebase diverges from these guides (new tooling, new patterns), propose updates to the guides and get maintainer approval before merging doc-only policy changes. See AGENTS.md.
- Vulnerability reports: follow SECURITY.md, not public issues for sensitive matters.