BLXCode
CLAUDE.md15 starsChanged 5 months agoMITView on GitHub
Always read and follow every rule in .agents/rules/ before making changes. Each file in that directory is a binding rule for work in this repo. blxcode is a Tauri 2 + Leptos 0.7 desktop application. The frontend is a Leptos CSR (client-side rendered) WASM app built with Trunk; the backend is a Tauri 2 Rust process. The Tauri dev command invokes trunk serve automatically via beforeDevCommand in tauri.conf.json. Entry point: src/main.rs → mounts <App/>. App controls the top-level rendering gate:…
- Reads credentials
In this repository17 other files it gives its agents.
- cavemanSkill
- create-agentsmdSkill
- diagnoseSkill
- frontend-designSkill
- gpt-image-2Skill
- grill-meSkill
- handoffSkill
- hyperframesSkill
- improve-codebase-architectureSkill
- leptos-guideSkill
- manage-plansSkill
- remotion-best-practicesSkill
- rust-async-patternsSkill
- rust-best-practicesSkill
- rust-patternsSkill
- rust-testingSkill
- tauri-v2Skill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 7
Always read and follow every rule in .agents/rules/ before making changes.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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.
Project Rules
Always read and follow every rule in .agents/rules/ before making changes. Each file in that directory is a binding rule for work in this repo.
Project Overview
blxcode is a Tauri 2 + Leptos 0.7 desktop application. The frontend is a Leptos CSR (client-side rendered) WASM app built with Trunk; the backend is a Tauri 2 Rust process.
Commands
# Dev (starts Trunk + Tauri together)
cargo tauri dev
# Production build
cargo tauri build
# Frontend only (WASM, served at http://localhost:1420)
trunk serve
trunk build
# Run all tests
cargo test --workspace
# Check frontend crate only
cargo check -p blxcode-ui --target wasm32-unknown-unknown
# Check Tauri crate only
cargo check -p blxcodeThe Tauri dev command invokes
trunk serveautomatically viabeforeDevCommandintauri.conf.json.
Architecture
Two-crate workspace
| Crate | Path | Role |
blxcode-ui | src/ | Leptos CSR WASM frontend |
blxcode | src-tauri/ | Tauri 2 backend (native) |
Frontend (src/)
Entry point: src/main.rs → mounts <App/>.
App controls the top-level rendering gate:
- EULA gate – checked via
localStorage(EULA_STORAGE_KEY). Decline callsexit_appTauri command. - WorkbenchShell – rendered after EULA acceptance. The app is free to use with no sign-in.
Module layout:
config/app.config.rs— all constants: localStorage keys, embedded browser defaults.service/—I18nService.i18n/—Locale+APP_LOCALES(language picker metadata),parse_bcp47/infer_from_browser_lang,lookup+locales/*.rs(onemsgmatch per language),content/eula/*.md+eula.rs. Default locale isEnUs. Regenerate non-English UI tables fromen_us.rswithscripts/render_i18n_locales_from_en.py(default: missing keys only; use--fullfor a full rewrite; requiresdeep-translatorin a venv). Adding anI18nKeyrequires a new string in everylocales/*.rsfile (compile-time exhaustiveness).workbench/— three-pane shell:Sidebar,WorkspacePanel,RightPanel; agent panel, browser tab.- Workspace data:
.agents/memory/,.agents/learnings/(memory API). Agent tasks live globally under{app_data_dir}/tasks/<workspace_hash>/index.json(seesrc-tauri/src/app_paths.rs), so they are not committed with the workspace. agent_wire.rs— mirrorssrc-tauri/src/agent/protocol.rs; shared Serde types for IPC events.tauri_bridge.rs— wrappers aroundinvoke()calls to Tauri commands.
Backend (src-tauri/src/)
lib.rs wires Tauri state and registers all commands.
Agent subsystem (agent/):
state.rs—AgentEngineState: thread-safe event queue (VecDequebehindMutex) + atomicbusy/cancelflags; persisted modelconversation(cleared viaagent_clear_conversation).ProviderEnvreadsBLX_ANTHROPIC_API_KEYfrom the environment.protocol.rs—UserTurn(input) andAgentEventenum (output:AssistantDelta,ToolCall,ToolResult,Done,Error).system_prompt.rs— shared system prompt for OpenRouter, OpenAI-compatible, and Anthropic paths.session_orchestrator.rs—dispatch_user_turn: loads settings + API key, spawns the configured HTTP provider turn.openrouter.rs/anthropic.rs— streaming tool-call loops against remote APIs.provider.rs—InferenceProvidertrait stub for future pluggable backends.tools.rs—WorkspaceRootGuard/ScopedReadOps: sandboxed file reads within the user-set workspace root.
IPC pattern: The frontend polls agent_poll_events on a timer to drain AgentEvents from the queue. Submissions go via agent_submit_turn. Chat + model context reset: agent_clear_conversation (disabled while the agent is busy). This is a poll-based design, not push/SSE.
Browser host (browser_host.rs): Embeds a native child webview on Windows/macOS (add_child via Tauri unstable API). On Linux, falls back to an <iframe> inside the SPA because native_child_inset_supported() returns false.
Key Configuration
src/config/app.config.rs— localStorage keys, embedded-browser defaults.BLX_ANTHROPIC_API_KEYenv var — enables real Anthropic provider path (currently stub only).tauri.conf.json— app identifiercom.bitslix.blxcode, window size, CSP, bundle targets.
Architecture Map
Workspace memory includes a harness-generated architecture map:
.agents/memory/ARCHITECTURE.md— curated index with a harness-managed Generated block (a Unit / Kind / Root / Map table) and a Manual section for human prose..agents/memory/architecture/modules/*.md— generated per-unit module skeletons named<kind>-<name>.md. The indexer is a multi-language plugin registry (src-tauri/src/memory/architecture/):detect.rsselects Rust/Node/Python/CMake/Go/Zig/Jai indexers underindexers/, with a Make fallback (plainMakefileprojects, e.g. C without CMake) and a Generic whole-tree fallback so a rebuild never fails when no manifest is present (e.g. the TypeScriptblxcode-ebworkspace indexes asnode-blxcode-eb). Generic/Make maps label detected source languages by extension, so any language without a dedicated indexer (Go, Ada, OCaml, …) is still covered..agents/memory/architecture/flows/— reserved for hand-authored flow notes..agents/memory/.meta/architecture-state.json— local state used for staleness checks; ignored by git.
Regenerate after large refactors with memory_rebuild_architecture from the app/agent tooling. Use memory_lint_architecture to mark generated notes stale when git HEAD changed without a rebuild. Commit ARCHITECTURE.md and architecture/modules/*.md so structural diffs travel with PRs; do not commit .agents/memory/.meta/.
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.

