Split agent and contributor docs by project

This commit is contained in:
Rūdolfs Ošiņš
2026-10-22 11:06:33 +02:00
parent fd4436bb8f
commit 6c0ddd64dc
9 changed files with 264 additions and 401 deletions
+4 -38
View File
@@ -6,14 +6,12 @@ structs using ts-rs (`crates/radicle-types/`).
The app lives in `desktop/` of the radicle-gui monorepo. It is its own npm
package and Cargo workspace: run every command here from `desktop/`, and all
paths in this file are relative to it. The repository root holds the Radicle
web explorer, which has its own `CLAUDE.md`. Release tags are
`releases/desktop/<version>`.
paths in this file are relative to it. Conventions shared with explorer
are in the root `AGENTS.md`.
## Tech stack
## Svelte syntax and aliases
- Svelte 5 with runes syntax (`$state`, `$derived`, `$props`, `$effect`)
- TypeScript, Vite, Vitest, Playwright
- Path aliases: `@app` (src), `@bindings` (crates/radicle-types/bindings), `@tests`
## Commands
@@ -21,7 +19,7 @@ web explorer, which has its own `CLAUDE.md`. Release tags are
### Development
```sh
npm run tauri dev # full Tauri dev build with hot reload
npm run dev # full Tauri dev build with hot reload and devtools
npm run start:http # test-http-api backend on :8081 (no Tauri runtime)
npm start # Vite dev server; in a browser it talks to test-http-api
```
@@ -145,37 +143,16 @@ Ports have full default implementations, so a driver only implements
a domain `Service` backed by the SQLite adapter instead of the ports; new
lists over large data sets should do the same.
## Domain glossary
- **NID** — Node ID, the public key in a DID (`did:key:z6Mk...`)
- **COB** — Collaborative Object (issue, patch, or identity as a Git DAG)
- **Delegate** — authorized repo maintainer; signatures determine canonical state
- **Seed** — hosting/replicating a repo; seed nodes are always-on servers
- **Canonical refs** — branches/tags resolved by delegate quorum
## Code conventions
- Prefer `undefined` over `null`
- Do not add comments unless explicitly asked. When writing comments,
use proper English sentences
- Ask before adding new dependencies
- When proposing a bigger architectural change, record it as a new ADR in
`docs/adr/`, numbered after the last one and in the same format
### Svelte components
- Props use `$props()`: `const { foo, bar = undefined }: Props = $props()`
- CSS: scoped styles with design tokens (`var(--color-text-primary)`,
`var(--txt-body-m-regular)`, `var(--border-radius-sm)`); use `:global()`
for styling slotted or `{@html}` content
- Loading states: `{#await promise}` blocks for inline async;
local `loading` boolean with `try/catch` for imperative fetches
### TypeScript
- Import backend types from `@bindings/*` — these are generated by ts-rs, never
hand-write interfaces that duplicate them
- Use ES private fields (`#field`), not the TypeScript `private` keyword
- Call Tauri commands via `invoke<T>("command_name", { arg })` from `@app/lib/invoke`
### Rust backend
@@ -188,14 +165,3 @@ lists over large data sets should do the same.
- `rust-toolchain.toml` tracks heartwood's. When bumping the `radicle` crate,
check heartwood's toolchain too: an older rustc fails inside the dependency
with a confusing error (e.g. E0382 in `cob/identity.rs` for radicle 0.25)
## Commit messages
- Imperative mood: "Add feature" not "Added feature"
- Capitalize subject, no trailing period, max 50 chars
## Do NOT
- Do not use `npm test` — no default test script exists
- Do not use `yarn` or `pnpm` — use npm
- Do not use `npx vitest` or `npx playwright test` — use the `npm run` scripts