Build environment
Environment
- Node 22, pnpm 10.x (CI uses pnpm
10.13.1). - Rust nightly, see
rust-toolchain.toml. The firstcargoinstall follows that file. - SQLx CLI:
cargo install sqlx-cli --no-default-features --features sqlite. After query changes runpnpm run prepare-db. - Optional
cargo install cargo-watch. - Secrets stay in a local
.env..dev-ports.jsonand generated Tauri dev config are local runtime artifacts.
Startup installs a single rustls crypto provider (install_rustls_crypto_provider). reqwest is built in no-provider mode. Construct TLS clients after that function runs.
Dev ports are allocated dynamically into .dev-ports.json. scripts/run-tauri-dev-desktop.js writes src-tauri/tauri.dev.generated.conf.json per run.
Commands
From the repository root:
pnpm install # JS deps; required before any pnpm script
pnpm run dev # Tauri desktop + Vite HMR
pnpm run check # frontend tsc --noEmit + cargo check
pnpm run lint # eslint max-warnings 0; clippy -D warnings --features qa-mode
pnpm run format # cargo fmt --all + prettierFrontend (frontend/ or pnpm --filter ./frontend):
pnpm test
pnpm exec vitest run src/path/file.test.ts
pnpm exec vitest run -t "renders tool card"
pnpm run check
pnpm run lintBackend:
cargo test --workspace
cargo test -p agents
cargo test -p agents acp_session_resume
cargo clippy --workspace --all-targets --features qa-mode -- -D warningsCodegen. Re-run when inputs change. CI fails :check on stale artifacts:
pnpm run generate-types
pnpm run generate-types:check
pnpm run prepare-db
pnpm run prepare-db:checkgenerate-types runs with SQLX_OFFLINE=true. The generator merges: it keeps declarations outside its replacement list, replaces replacement_declarations(), and drops removed_declarations(). To export a new #[derive(TS)] type, add insert_declaration::<T>() in src-tauri/src/bin/generate_types.rs, then generate.
Recommended flow
- Read
CONTEXT.md, relevant ADRs, maiden-skill, and directly matching SKILL.md files. - Isolate the branch with a git worktree (using-git-worktrees skill in-repo).
- For a behavior change, write a failing test first (tdd skill), then the smallest implementation.
- Run targeted tests, then the matching
check/lint. - After type, SQL, or agent-schema changes, run the matching generate/prepare.
pnpm run format.- Open a PR per PR and security.

