This guide covers development workflows, planning tooling, and contributor
conventions. For end-user setup and usage, see README.md or
visit netclaw.dev.
dotnet build Netclaw.slnx
dotnet test Netclaw.slnx
dotnet slopwatch analyzeThese files define how planning and implementation work should be routed:
AGENTS.md— agent personas and routing rulesPROJECT_CONTEXT.md— current product direction and constraintsTOOLING.md— tool and infrastructure contextCLAUDE.md— agent constitution and quality bar
docs/prd/— product requirements and acceptance criteriadocs/spec/— engineering specifications and contractsdocs/ui/— management UI mockupsopenspec/specs/— capability specs for ongoing evolutionopenspec/changes/— change proposals, design notes, and execution tasks
OpenSpec is initialized for OpenCode in this repository.
Common commands:
/opsx:new— create a new change/opsx:continue— create next artifact in the change workflow/opsx:ff— fast-forward: generate all remaining artifacts at once/opsx:apply— implement tasks from a change/opsx:verify— verify implementation matches change artifacts/opsx:archive— archive a completed change
CLI equivalents are available via openspec --help.
Netclaw-specific helper skills:
.opencode/skills/netclaw-openspec-planning/SKILL.md.opencode/skills/netclaw-openspec-milestones/SKILL.md
RALPH infrastructure is available in this repo and tuned for OpenSpec-traceable execution.
ralph-opencode.sh— OpenCode loop runnerralph.sh— Claude Code loop runner.claude/skills/ralph-loop.md— loop discipline with OpenSpec gates.claude/skills/ralph-run-diagnostics.md— process diagnostics.claude/skills/ralph-output-adversarial-review.md— adversarial reviewIMPLEMENTATION_PLAN.md— RALPH task queueBACKLOG_PARKING_LOT.md— parked items requiring human decisions
Developer-only integration sandbox for daemon lifecycle and gateway checks.
This is intentionally script-driven (not a user-facing netclaw test smoke
command yet).
# Start sandbox (build local image + start Ollama + pull tiny model)
scripts/smoke/up.sh
# Start without rebuilding image (useful after pre-building or in CI)
SMOKE_BUILD=0 scripts/smoke/up.sh
# Run smoke checks (daemon start/status/health/stop)
scripts/smoke/check.sh
# Tear down sandbox
scripts/smoke/down.sh
# Optional: remove volumes too
SMOKE_REMOVE_VOLUMES=1 scripts/smoke/down.shOptional model override:
SMOKE_OLLAMA_MODEL=qwen2:0.5b scripts/smoke/up.shUseful timeout overrides for scripts/smoke/check.sh:
# Wait up to 20 minutes for model pull/bootstrap (default: 1200)
INIT_TIMEOUT_SECONDS=1200 scripts/smoke/check.sh
# Per-command timeout inside sandbox (default: 120)
STEP_TIMEOUT_SECONDS=120 scripts/smoke/check.shsmoke_sandbox is available in GitHub Actions:
- Runs manually via
workflow_dispatch. - Runs on every pull request update.
- Uses Docker Buildx + GitHub Actions cache for smoke image layers.
- Always uploads
smoke-logs-*artifact (includingcheck.log, container logs, compose status, daemon log, PID snapshot) for debugging.
- Solution:
Netclaw.slnx - Daemon:
src/Netclaw.Daemon/(Web API host,netclawd) - CLI:
src/Netclaw.Cli/(thin client,netclaw) - Actors:
src/Netclaw.Actors/(session management, persistence, tools) - Configuration:
src/Netclaw.Configuration/(paths, providers, models) - Channels:
src/Netclaw.Channels/(channel abstractions) - Slack:
src/Netclaw.Channels.Slack/(Slack Socket Mode gateway) - Discord:
src/Netclaw.Channels.Discord/(Discord gateway) - Providers:
src/Netclaw.Providers/(LLM provider implementations) - OpenAI Compatible:
src/Netclaw.OpenAICompatible/(OpenAI-compatible API layer) - Search:
src/Netclaw.Search/(web search backends) - Security:
src/Netclaw.Security/(ACL, device pairing, token management) - Tools:
src/Netclaw.Tools.Abstractions/andsrc/Netclaw.Tools.Generators/
Netclaw uses a daemon + thin client architecture:
-
netclawd(src/Netclaw.Daemon/) — always-on daemon process hosting the Akka actor system, LLM sessions, tool execution, and persistence. Exposes a SignalR hub at/hub/sessionplus authenticated management endpoints for remote clients. -
netclaw(src/Netclaw.Cli/) — thin CLI client for interactive chat, daemon management, and configuration. Connects to the daemon via SignalR and authenticated HTTP.
- Gall's Law: build the simplest working system first — single-process runtime, actor-driven, persistence-backed
- Default-deny security: explicit ACL and policy checks everywhere
- .NET 10 runtime baseline with Google Protobuf for persistence serialization
- Session identity is Slack thread:
{channelId}/{threadTs} - MCP server integration included from the start
# Build everything
dotnet build Netclaw.slnx
# Publish both binaries to a shared output folder
dotnet publish src/Netclaw.Daemon/Netclaw.Daemon.csproj -c Release -o ./out
dotnet publish src/Netclaw.Cli/Netclaw.Cli.csproj -c Release -o ./outAdd the output folder to your PATH:
export PATH="$PWD/out:$PATH"Or point the CLI at the daemon binary explicitly:
export NETCLAW_DAEMON_PATH="$PWD/out/netclawd"
alias netclaw="$PWD/out/netclaw"