Development and Build
Repository Layout
Use these directories as the main map:
cmd/clawgo: CLI and entrypointpkg: core runtime implementationwebui: React consoleworkspace: default workspace templatedocs: in-repo project docs and assets
Recent workspace changes add one especially important coding skill:
spec-coding
Its templates live under:
workspace/skills/spec-coding/templatesand include:
spec.mdtasks.mdchecklist.md
Those files belong in the current coding project root, not as permanent files in the ClawGo repository root.
Go Build
Common commands:
make build
make build-variants
make build-all
make build-all-variants
make build-linux-slim
make testWebUI Build
make build-webuiThis installs dependencies, builds the frontend, and produces webui/dist.
Recent WebUI changes moved routes to React.lazy + Suspense and added manual chunk splitting in the Vite build. The main named chunks include:
react-vendormotionicons
That matters when you inspect bundle output, debug initial page load, or inspect the embedded WebUI assets.
Embedded Asset Sync
Release builds rely on Go embed for workspace templates and WebUI assets.
Related Make targets:
make sync-embed-workspace
make sync-embed-workspace-base
make sync-embed-webui
make cleanup-embed-workspacePackage and Release
make package-allThis creates:
- per-platform full, no-channel, and single-channel archives
checksums.txt
The release flow now expects artifacts such as:
clawgo-<os>-<arch>.tar.gzclawgo-<os>-<arch>-nochannels.tar.gzclawgo-<os>-<arch>-<channel>.tar.gz
For public install entrypoints, the docs site also mirrors the script at:
https://clawgo.dev/install.shThat keeps end-user install instructions independent from a GitHub raw URL.
Current <channel> variants include:
telegramdiscordfeishumaixcamqqdingtalkwhatsapp
WebUI is now embedded in the binary, so releases no longer need a separate webui.tar.gz.
Channel-Specific Build Variants
Recent Makefile and release changes add channel-specific build variants.
Key targets:
make build-variantsmake build-all-variantsmake package-all
Meaning:
full: full channel buildnone: all channels omitted, producing the-nochannelsartifact, but it now also includeswith_tui- single-channel variants: keep one channel and omit the others through
omit_<channel>build tags
Recent builds also include with_tui in the full variant, so TUI is no longer exclusive to the no-channel build.
That means current full and no-channel releases both keep a terminal entrypoint:
full: all channel capabilities plusclawgo tuinone: no external message channels, butclawgo tuiremains availableclawgo tuiremains available as the terminal UI entrypoint- it fits local debugging, remote operations, or Gateway/API-only deployments
The install script also now supports:
./install.sh --variant telegramRecommended Test Command
go test ./...Spec-Driven Coding
Recent agent and workspace changes wire spec-driven coding into the main workflow.
When a request is treated as non-trivial coding work, the runtime can maintain these files in the current project root:
spec.md: scope, goals, decisions, tradeoffstasks.md: current task breakdown and progresschecklist.md: final verification gate
Implementation details:
- missing files can be scaffolded from
workspace/skills/spec-coding/templates - the context builder treats these files as part of active project context when present
- task completion can update
tasks.mdandchecklist.md - rework or regression follow-up can reopen the task and reset the checklist
If you are tracing why the agent created or updated these files, start with:
pkg/agent/context.gopkg/agent/spec_coding.goworkspace/skills/spec-coding/