diff --git a/.claude/skills/setup/SKILL.md b/.claude/skills/setup/SKILL.md index 1b97ec5..335a9b1 100644 --- a/.claude/skills/setup/SKILL.md +++ b/.claude/skills/setup/SKILL.md @@ -128,6 +128,11 @@ Ask the user: > > Messages starting with `@TriggerWord` will be sent to Claude. +If they choose something other than `Andy`, update it in these places: +1. `groups/CLAUDE.md` - Change "# Andy" and "You are Andy" to the new name +2. `groups/main/CLAUDE.md` - Same changes at the top +3. `data/registered_groups.json` - Use `@NewName` as the trigger when registering groups + Store their choice - you'll use it when creating the registered_groups.json and when telling them how to test. ## 7. Register Main Channel diff --git a/CLAUDE.md b/CLAUDE.md index 5be666d..8182e2d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,36 +1,40 @@ # NanoClaw -Personal Claude assistant via WhatsApp. +Personal Claude assistant. See [README.md](README.md) for philosophy and setup. See [REQUIREMENTS.md](REQUIREMENTS.md) for architecture decisions. -## Structure +## Quick Context -- `src/index.ts` - Main application (WhatsApp + routing + agent) -- `package.json` - Dependencies and scripts -- `.mcp.json` - MCP server configuration (gmail, scheduler) -- `groups/CLAUDE.md` - Global memory -- `groups/{name}/CLAUDE.md` - Per-group memory +Single Node.js process that connects to WhatsApp, routes messages to Claude Agent SDK running in Apple Container (Linux VMs). Each group has isolated filesystem and memory. -## Configuration +## Key Files -Set environment variable `ASSISTANT_NAME` to change the trigger (default: "Andy"). - -Or edit the CONFIG object in `src/index.ts`. +| File | Purpose | +|------|---------| +| `src/index.ts` | Main app: WhatsApp connection, message routing, IPC | +| `src/config.ts` | Trigger pattern, paths, intervals | +| `src/container-runner.ts` | Spawns agent containers with mounts | +| `src/scheduler.ts` | Runs scheduled tasks | +| `src/db.ts` | SQLite operations | +| `groups/{name}/CLAUDE.md` | Per-group memory (isolated) | ## Skills -- `/setup` - Install dependencies, authenticate, start services -- `/customize` - Modify behavior +| Skill | When to Use | +|-------|-------------| +| `/setup` | First-time installation, authentication, service configuration | +| `/customize` | Adding channels, integrations, changing behavior | +| `/debug` | Container issues, logs, troubleshooting | -## Architecture +## Development -``` -WhatsApp (baileys) ─┬─> SQLite (messages.db) - │ ↓ - │ Polling loop - │ ↓ - │ Claude Agent SDK - │ ↓ - └─< Send response +```bash +npm run dev # Run with hot reload +npm run build # Compile TypeScript +./container/build.sh # Rebuild agent container ``` -Single Node.js process handles everything. +Service management: +```bash +launchctl load ~/Library/LaunchAgents/com.nanoclaw.plist +launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist +``` diff --git a/groups/CLAUDE.md b/groups/CLAUDE.md index 8ef3da0..11766cf 100644 --- a/groups/CLAUDE.md +++ b/groups/CLAUDE.md @@ -1,30 +1,18 @@ -# NanoClaw Global Memory +# Andy -This file is read by all group conversations. Only the main channel can write here. +You are Andy, a personal assistant. You help with tasks, answer questions, and can schedule reminders. -## About +## What You Can Do -Personal Claude assistant via WhatsApp. +- Answer questions and have conversations +- Search the web and fetch content from URLs +- Read and write files in your workspace +- Run bash commands in your sandbox +- Schedule tasks to run later or on a recurring basis +- Send messages back to the chat -Assistant name is configured in `src/config.py` (ASSISTANT_NAME). +## Your Workspace -## Commands +Files you create are saved in `/workspace/group/`. Use this for notes, research, or anything that should persist. -From any group: -- `@{name} [message]` - Talk to Claude -- `/clear` - Reset conversation (keeps memory) -- `@{name} list tasks` - Show scheduled tasks - -From main channel only: -- `@{name} add group "Name"` - Register a new group -- `@{name} remove group "Name"` - Unregister a group -- `@{name} list groups` - Show registered groups -- `@{name} remember [fact]` - Add to global memory - -## Preferences - - - -## Notes - - +Your `CLAUDE.md` file in that folder is your memory - update it with important context you want to remember. diff --git a/groups/main/CLAUDE.md b/groups/main/CLAUDE.md index f9d41bc..5a3fb9c 100644 --- a/groups/main/CLAUDE.md +++ b/groups/main/CLAUDE.md @@ -1,6 +1,21 @@ -# Main Channel - Admin Context +# Andy -You are running in the **main channel**, which has elevated privileges. +You are Andy, a personal assistant. You help with tasks, answer questions, and can schedule reminders. + +## What You Can Do + +- Answer questions and have conversations +- Search the web and fetch content from URLs +- Read and write files in your workspace +- Run bash commands in your sandbox +- Schedule tasks to run later or on a recurring basis +- Send messages back to the chat + +--- + +## Admin Context + +This is the **main channel**, which has elevated privileges. ## Container Mounts diff --git a/package.json b/package.json index c65c5be..b862038 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nanoclaw", "version": "1.0.0", - "description": "Personal Claude assistant via WhatsApp", + "description": "Personal Claude assistant. Lightweight, secure, customizable.", "type": "module", "main": "dist/index.js", "scripts": {