Lean guidance for coding agents working in Dimo. Keep context light: read deeper docs on demand for the branch you touch rather than front-loading everything.
- Find any doc or ADR:
docs/INDEX.md(directory map, task routing table, all active ADRs). - System boundaries & 26-crate map:
docs/architecture.md. - Domain terminology:
CONTEXT.md. - Frontend UI, tokens & styling:
DESIGN.mdandfrontend/CLAUDE.md(read when touching user-visible UI). - Engineering discipline & complex tasks:
maiden-skilland task-matching skills under.agents/skills/.
- Single-Seam Rust Host + Electron Thin Shell (ADR-0078, ADR-0090): Product commands register once in
HostCommandRegistry(crates/application, mirrored inshared/hostCommands.ts) and push updates flow throughHostEventBus.electron/(@dimo/electron) is a thin shell spawningdimo-server --desktop; UI components talk throughBackendTransport(frontend/src/lib/transport/), keeping Electron Desktop and headlessdimo-serveridentical. - Agent Integration (ADR-0087): Route all coding agents through
crates/agents+crates/conversations, prioritizing dedicated native Agent engine adapters first and ACP (v1/v2 + Registry) as compatibility fallback. Reservecrates/executorsstrictly for workspace shell scripts and shared log/identity types. - SQLite Single-Authority Conversations (ADR-0091):
conversation_eventsandconversation_timeline_rowsonWritePool(1)/ReadPool(4)are the sole authority for conversation history and timeline projections. - Full-Trust v4 Plugins with Zero Host Privilege (ADR-0048, ADR-0069): Official plugins in
plugins/*use the exact same public contract as third-party plugins—no plugin-ID special cases in Host code.
Full scripts live in package.json:
pnpm run dev— Launch Electron desktop app + Vite HMR +dimo-server --desktopsidecar.pnpm run check/pnpm run lint/pnpm run format— Typecheck, lint (--max-warnings 0, clippy-D warnings), and format.pnpm --filter ./frontend test/pnpm run electron:test/cargo test --workspace— Unit and integration tests (run targeted tests first).pnpm run arch:check&pnpm run plugin:no-privilege— Verify architecture invariants and zero plugin privilege.
Regenerate derived artifacts via scripts instead of editing them by hand:
shared/types.ts→ register new#[derive(TS)]types ingenerate_types.rsand runpnpm run generate-types.crates/db/.sqlx/→ runpnpm run prepare-dbafter SQLx query or migration changes.docs/protocol/v1/→ runpnpm run remote-protocol-schema(checked viaremote-protocol-schema:check).docs/plugins/contract-bindings.md→ runnode scripts/plugin-contract-report.mjs.
Every document in this repository must stay accurate, concise, and easy to index:
- Write current truth in place: When behavior or architecture changes, edit the existing section directly. Never append revision banners (
状态注记),## Amendmentsections, or "previously A, updated to B" change histories. - Keep prose high-signal and brief: Record durable contracts, boundaries, and key trade-offs. Compress historical background to 2–3 sentences; omit sprint logs, PR checklists, debugging diaries, and implementation blow-by-blows.
- Delete obsolete docs cleanly: Once a plan lands or a spec/ADR is replaced, fold durable contracts into the canonical doc and delete the obsolete file. Never commit completed plans, temporary audits, scratch todos, or screenshot dumps into
docs/. - Follow canonical paths, naming, and indexing: Place each doc in its designated directory per
docs/INDEX.mdusing lowercase ASCIIkebab-case.md(ADRs:docs/adr/NNNN-kebab-case.mdwithstatus: acceptedfrontmatter). Updatedocs/INDEX.mdin the same change whenever adding, moving, renaming, or deleting a doc.