picoclaw/AGENTS.md
2026-05-06 15:07:28 +03:00

2.3 KiB

Microsoft Windows [Version 10.0.26200.8116] (c) Microsoft Corporation. All rights reserved.

C:\Users\user>ollama list NAME ID SIZE MODIFIED smollm2:1.7b cef4a1e09247 1.8 GB 5 hours ago qwen3.5:4b 2a654d98e6fb 3.4 GB 3 days ago deepseek-v4-pro:cloud 22bfd5026abd - 3 days ago qwen3-coder-next:cloud aa626c11ae8d - 2 months ago

C:\Users\user>

PicoClaw

Build & Test Commands

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