AI-Assisted Development Guide
The NeoMind codebase is designed for AI-assisted development from day one β clean crate layering, a project-level CLAUDE.md context file, a 33-section frontend design spec, and a dedicated extension development skill. This guide shows you how to use Claude Code (or any AI coding tool with project context support) to maximize your development velocity.
Core idea: You don't need to read all the source code before starting. Clone the repo, open it with an AI tool, describe what you want to build in natural language β the AI explores the code, generates the implementation, and runs tests for you.
Why NeoMind is AI-friendlyβ
| Design decision | Benefit for AI |
|---|---|
Project-level CLAUDE.md | AI reads tech stack, commands, architecture rules, and code conventions automatically on project open β zero config |
web/DESIGN_SPEC.md (33 sections) | When building frontend, AI automatically follows the color system, component standards, and accessibility rules |
| Crate-based layering | neomind-devices, neomind-rules, neomind-extension-sdk⦠AI can precisely locate the target module |
| Real extension codebase | 16 official extensions serve as ready-made reference implementations β AI can read the code and learn patterns directly |
| CLI-first architecture | neomind widget create, neomind extension install⦠AI can complete the build-test-install loop via CLI |
| Strongly typed Rust + TypeScript | The compiler is AI's instant verification β generate code, compile, and immediately know if it's correct |
Quick Start (5 minutes)β
Step 1: Install Claude Codeβ
# Install Claude Code CLI
npm install -g @anthropic-ai/claude-code
# Verify
claude --version
Step 2: Clone the repo you want to developβ
# Extension development β clone the extensions repo
git clone https://github.com/camthink-ai/NeoMind-Extensions.git
cd NeoMind-Extensions
# Or component development β clone the components repo
git clone https://github.com/camthink-ai/NeoMind-Dashboard-Components.git
cd NeoMind-Dashboard-Components
# Or main project development β clone the main repo
git clone https://github.com/camthink-ai/NeoMind.git
cd NeoMind
Step 3: Open the project with Claude Codeβ
claude
Claude Code automatically reads the CLAUDE.md file in the project root (if present), acquiring context about the tech stack, build commands, and code conventions. The NeoMind main repo ships with CLAUDE.md β it works out of the box.
Step 4: Start the conversationβ
> Help me create a Modbus extension that reads holding registers and exposes them as metrics
Claude Code will: explore existing extension code β reference similar implementations β generate code β run compilation checks.
Project Context: CLAUDE.mdβ
CLAUDE.md is the project instruction file in the NeoMind main repo root. Claude Code automatically loads it when opening the project β no manual action needed.
It contains the key information AI needs:
| Section | Content | What AI uses it for |
|---|---|---|
| Tech Stack | Rust / React 18 / Tauri 2.x | Choose the correct language and framework |
| Development Commands | cargo build, npm run dev, npm run tauri:dev | Know how to compile, test, and run |
| Project Structure | Module responsibilities under crates/ | Locate target code positions |
| Key Rules | Ollama uses /api/chat, DataSourceId format, Tauri API base | Avoid common pitfalls |
| Code Conventions | Rust fmt/clippy, Zustand slices pattern, DESIGN_SPEC.md | Follow project coding standards |
| Frontend Design Standards | 33-section design spec index | Generate frontend code that matches the design system |
Extension and component repos currently don't have a
CLAUDE.md. Before developing, ask AI to readdocs/guides/en/extension-system.mdor the relevant technical docs to establish context:> First read docs/guides/en/extension-system.md to understand the extension architecture, then help me create...
Workflow 1: Building Extensions with AIβ
Extensions are the most common direction for growing the NeoMind ecosystem. The standard AI-assisted workflow:
1. Describe the requirementβ
> I want to build an OPC UA bridge extension.
> Function: connect to an OPC UA server, subscribe to specified node value changes,
> and expose the values as metrics for the NeoMind dashboard.
> Reference the existing modbus-bridge extension's code structure.
2. AI explores and generatesβ
Claude Code will:
- Read the
modbus-bridgecode as a reference pattern - Create the project structure (
Cargo.toml+src/lib.rs+manifest.json) - Implement the
Extensiontrait (new,metadata,start,stop, metric publishing) - Export the FFI entry point with the
neomind_export!()macro - Run
cargo build --releaseto verify compilation
3. Debug and iterateβ
> There's a compilation error β check what's wrong
> Add a connect command so an Agent can trigger the connection
> The metric unit is wrong β it should be Celsius, not Fahrenheit
4. Package and installβ
> Help me package this as a .nep and install it to local NeoMind for testing
AI will run the cross-platform build script, generate the .nep package, then install it via neomind extension install.
Reference implementationsβ
The NeoMind-Extensions repo has 16 official extensions to reference directly:
| Extension | Good reference for |
|---|---|
weather-forecast-v2 | HTTP API calls + metric publishing |
yolo-device-inference | ML model loading + inference commands |
modbus-bridge | Industrial protocol bridging |
opcua-bridge | OPC UA protocol integration |
image-analyzer-v2 | Image processing + analysis commands |
yolo-video-v2 | Video stream processing + streaming inference |
homeassistant-bridge | Third-party platform integration |
face-recognition | Computer vision + components |
Prompt tip: Ask AI to reference the existing extension closest to your needs. For example, for a BACnet bridge, reference
modbus-bridge; for license plate recognition, referenceyolo-device-inference.
Extension development skillβ
NeoMind includes a built-in extension development skill file (crates/neomind-agent/src/skills/builtins/extension-development.md) containing:
- Complete Rust code template (all trait methods)
- State management patterns (Atomic / RwLock / Mutex)
- HTTP request patterns (
ureqsync library) - Extension type classification (tool / connector / processor / analyzer / bridge)
- Common errors and solutions
Ask AI to read this file to get up to speed quickly:
> Read crates/neomind-agent/src/skills/builtins/extension-development.md,
> then create the extension using the template inside
Workflow 2: Building Dashboard Components with AIβ
Dashboard components are React components implementing the Dashboard Component Registry protocol.
1. Scaffold with CLIβ
# Create the skeleton with the NeoMind CLI first
neomind widget create "Temperature Heatmap" --widget-type custom
2. Implement the component with Claude Codeβ
> Help me implement this dashboard component.
> Function: receive temperature data from dataSource and render it as a heatmap.
> Must follow web/DESIGN_SPEC.md's color system (use design tokens only).
> Use ECharts' heatmap chart type.
Claude Code will:
- Read
DESIGN_SPEC.mdSection 1 (Color System) and Section 30 (Data Visualization) - Generate
manifest.json(component declaration + config schema) - Generate
bundle.js(IIFE-format React component) - Use CSS variables (
var(--color-*)) instead of hardcoded colors