embedist
CLAUDE.md47 starsChanged 6 months agoMITView on GitHub
The app root is this directory (embedist/embedist). The parent folder embedist/ is only a container — do not run npm/cargo from there. A separate Docusaurus package lives in docs/ with its own package.json; only run its scripts when editing docs. AGENTS.md in this directory contains overlapping developer notes; keep both in sync when behavior changes. Frontend scripts (package.json): - npm run dev — Vite dev server (port 1420, required by tauri.conf.json) - npm run build — tsc && vite build…
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
When bumping the version, update all three files — they're independent and drift silently:
- Very specific: line 51
Do not use Option::is_none_or(...) — prefer is_some_and(...) or explicit match for stable Rust.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Repo layout note
The app root is this directory (embedist/embedist). The parent folder embedist/ is only a container — do not run npm/cargo from there. A separate Docusaurus package lives in docs/ with its own package.json; only run its scripts when editing docs.
AGENTS.md in this directory contains overlapping developer notes; keep both in sync when behavior changes.
Commands
Frontend scripts (package.json):
npm run dev— Vite dev server (port 1420, required bytauri.conf.json)npm run build—tsc && vite build(runs TypeScript strict-mode check)npm run tauri dev— run the full desktop app in developmentnpm run tauri build— produce release artifacts
There is no lint or test npm script. No automated test suite exists (*.test.*, *.spec.*, src-tauri/tests are all absent). Validation = npm run build + cargo clippy --manifest-path src-tauri/Cargo.toml + manual app checks.
Release artifacts from npm run tauri build:
- Portable:
src-tauri/target/release/embedist.exe - Installer:
src-tauri/target/release/bundle/nsis/Embedist_<version>_x64-setup.exe(NSIS only — set bytauri.conf.jsonbundle.targets)
Release version sync
When bumping the version, update all three files — they're independent and drift silently:
package.jsonsrc-tauri/Cargo.tomlsrc-tauri/tauri.conf.json
Architecture
Tauri 2 desktop app (Windows-only target). React 18 + TypeScript (strict) frontend talks to a Rust backend via Tauri invoke commands.
Frontend entry: src/main.tsx → src/App.tsx. State lives in Zustand stores under src/stores/ (aiStore, fileStore, settingsStore, uiStore) with localStorage persistence. Business logic is in hooks (src/hooks/use*.ts).
Backend entry: src-tauri/src/main.rs → src-tauri/src/lib.rs. All Tauri commands are registered in the invoke_handler! macro in lib.rs and implemented in src-tauri/src/commands/{ai,filesystem,platformio,pty,serial}.rs. Shared async state (SerialState, AIState, BuildState, PtyState, WatchState) is attached via .manage() in lib.rs — add new state there.
AI modes: chat / plan / agent / debug. Mode-specific system prompts are Markdown files at src/lib/prompts/modes/*.md, imported as ?raw strings via src/lib/prompts/index.ts. PROMPTS in that file also defines each mode's RAG context categories and empty-state copy.
Tool calling: Agent-mode tool execution runs client-side — src/hooks/useAgent.ts drives the loop (up to MAX_ITERATIONS = 50), dispatching to tools in src/lib/agent-tools.ts. Path safety checks live in useAgent.ts (isPathSafe, PROJECT_SCOPED_TOOLS). The Rust backend (src-tauri/src/commands/ai.rs) implements tool-enabled chat for OpenAI / Anthropic / DeepSeek / custom OpenAI-compatible endpoints. Ollama and Google providers are text-only in the backend — don't assume tool calling works there.
PlatformIO integration: src-tauri/src/commands/platformio.rs shells out to pio. Build output streams via Tauri events; errors are parsed into a Problems panel. Build cancellation uses the shared BuildState.
CSP: tauri.conf.json restricts connect-src to the specific AI provider hosts + localhost:11434 (Ollama). Adding a new provider host means updating that CSP.
Rust gotchas (from prior pain)
- For cloneable async shared state, use
Arc<tokio::sync::Mutex<...>>(seeBuildStateinsrc-tauri/src/commands/platformio.rs). - Do not use
Option::is_none_or(...)— preferis_some_and(...)or explicit match for stable Rust. run_shellinsrc-tauri/src/commands/filesystem.rsrejects shell metacharacters; it won't run chained/piped expressions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

