Add comprehensive documentation including: - CLAUDE.md for build instructions and environment setup - project-map.md for directory structure and key file overview - docs/reference/tools-api.md for detailed tools API and architecture - session-log.md for tracking development decisions - updates to plugin tool injection documentation regarding security risks
37 lines
1.8 KiB
Markdown
37 lines
1.8 KiB
Markdown
# PicoClaw
|
|
|
|
## Build & Test Commands
|
|
|
|
```bash
|
|
make build # Build for current platform (runs generate first)
|
|
make build-all # Cross-compile for all supported platforms
|
|
make test # Run Go tests + web tests
|
|
make lint # golangci-lint with goolm,stdjson tags
|
|
make check # deps + fmt + vet + test + lint-docs
|
|
```
|
|
|
|
## Environment Setup
|
|
|
|
- Copy `.env.example` to `.env` and configure API keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.)
|
|
- Go 1.25.9+ required
|
|
- Build tags: `goolm,stdjson` (set via GO_BUILD_TAGS or Makefile)
|
|
- CGO_ENABLED=0 by default; CGO_ENABLED=1 only for macOS launcher builds
|
|
|
|
## Critical Constraints
|
|
|
|
- **Always run `make generate` before `make build`** — code generation creates required workspace symlinks
|
|
- **Never edit `cmd/picoclaw/workspace/` directly** — it's regenerated by `go generate`
|
|
- **MIPS builds require ELF e_flags patch** — handled automatically by Makefile
|
|
- **loong64 needs manual ztypes_loong64.go** — handled automatically by Makefile
|
|
- **WhatsApp native builds** add `whatsapp_native` tag but produce larger binaries
|
|
- **Workspace location**: `~/.picoclaw/workspace` (skills, memory stored here at runtime)
|
|
- **macOS launcher**: requires CGO_ENABLED=1 and minimal macOS 10.11 target
|
|
- **No hardcoded API keys in CLI** — project is migrating to OAuth 2.0 flows
|
|
- **Memory target**: core process <20MB for 64MB RAM boards; optimize data structures over storage
|
|
|
|
## Architecture Notes
|
|
- **Protocol-first**: Migrating from vendor-based to protocol-based provider classification (OpenAI-compat, Ollama-compat)
|
|
- **Multi-architecture**: x86_64, ARM64, MIPS, RISC-V, LoongArch
|
|
- **14+ chat channels** via adapter pattern in pkg/channels/
|
|
- **MCP support**: Model Context Protocol server in pkg/mcp/
|
|
- **Tools API**: See `docs/reference/tools-api.md` for complete tools documentation
|