Update project and agent context files

- CLAUDE.md: Concise dev context, references README/REQUIREMENTS
- groups/CLAUDE.md: Proper agent identity for Andy
- groups/main/CLAUDE.md: Add agent identity, keep admin context
- package.json: Update description
- setup skill: Note to update name in multiple places

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Gavriel
2026-02-01 13:03:51 +02:00
parent dbf39a9484
commit fb4ce8dce9
5 changed files with 62 additions and 50 deletions

View File

@@ -128,6 +128,11 @@ Ask the user:
> >
> Messages starting with `@TriggerWord` will be sent to Claude. > 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. Store their choice - you'll use it when creating the registered_groups.json and when telling them how to test.
## 7. Register Main Channel ## 7. Register Main Channel

View File

@@ -1,36 +1,40 @@
# NanoClaw # 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) 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.
- `package.json` - Dependencies and scripts
- `.mcp.json` - MCP server configuration (gmail, scheduler)
- `groups/CLAUDE.md` - Global memory
- `groups/{name}/CLAUDE.md` - Per-group memory
## Configuration ## Key Files
Set environment variable `ASSISTANT_NAME` to change the trigger (default: "Andy"). | File | Purpose |
|------|---------|
Or edit the CONFIG object in `src/index.ts`. | `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 ## Skills
- `/setup` - Install dependencies, authenticate, start services | Skill | When to Use |
- `/customize` - Modify behavior |-------|-------------|
| `/setup` | First-time installation, authentication, service configuration |
| `/customize` | Adding channels, integrations, changing behavior |
| `/debug` | Container issues, logs, troubleshooting |
## Architecture ## Development
``` ```bash
WhatsApp (baileys) ─┬─> SQLite (messages.db) npm run dev # Run with hot reload
│ ↓ npm run build # Compile TypeScript
│ Polling loop ./container/build.sh # Rebuild agent container
│ ↓
│ Claude Agent SDK
│ ↓
└─< Send response
``` ```
Single Node.js process handles everything. Service management:
```bash
launchctl load ~/Library/LaunchAgents/com.nanoclaw.plist
launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist
```

View File

@@ -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: Your `CLAUDE.md` file in that folder is your memory - update it with important context you want to remember.
- `@{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
<!-- Add global preferences here -->
## Notes
<!-- Add persistent notes here -->

View File

@@ -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 ## Container Mounts

View File

@@ -1,7 +1,7 @@
{ {
"name": "nanoclaw", "name": "nanoclaw",
"version": "1.0.0", "version": "1.0.0",
"description": "Personal Claude assistant via WhatsApp", "description": "Personal Claude assistant. Lightweight, secure, customizable.",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {