From db0f9620ddbad73af0d7f0a570d4b2379518534f Mon Sep 17 00:00:00 2001 From: Prasad Thammineni Date: Wed, 28 Jan 2026 06:38:49 -0800 Subject: [PATCH] docs: improve CLAUDE.md with overview and single test commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add required Claude Code header - Add high-level architecture overview explaining what Moltbot is - Document how to run single test files and pattern matching - Add watch mode command 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- AGENTS.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 44b0149fd..0de1d2de9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,20 @@ -# Repository Guidelines +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Overview + +Moltbot is a multi-channel AI assistant gateway that connects messaging platforms (WhatsApp, Telegram, Discord, Slack, Signal, iMessage, LINE, and more) to AI models. It runs as a local gateway (CLI or macOS menubar app) and routes messages between users and AI agents. + +**Core architecture:** +- **Gateway** (`src/gateway/`): WebSocket server handling client connections, chat sessions, and channel routing +- **Channels** (`src/telegram/`, `src/discord/`, `src/slack/`, `src/signal/`, `src/imessage/`, `src/web/`, `src/line/`): Platform-specific message adapters +- **Agents** (`src/agents/`): AI agent runtime with Pi integration (`@mariozechner/pi-*` packages) +- **CLI** (`src/cli/`, `src/commands/`): Command-line interface built with Commander +- **Extensions** (`extensions/`): Plugin system for additional channels (MS Teams, Matrix, Zalo, Twitch, etc.) +- **Native apps** (`apps/`): macOS, iOS, and Android apps wrapping the gateway + +## Repository Guidelines - Repo: https://github.com/moltbot/moltbot - GitHub issues/comments/PR comments: use literal multiline strings or `-F - <<'EOF'` (or $'...') for real newlines; never embed "\\n". @@ -47,6 +63,9 @@ - Type-check/build: `pnpm build` (tsc) - Lint/format: `pnpm lint` (oxlint), `pnpm format` (oxfmt) - Tests: `pnpm test` (vitest); coverage: `pnpm test:coverage` +- Run a single test file: `pnpm test src/path/to/file.test.ts` +- Run tests matching a pattern: `pnpm test -t "pattern"` +- Watch mode: `pnpm test:watch` ## Coding Style & Naming Conventions - Language: TypeScript (ESM). Prefer strict typing; avoid `any`.