# wa-plugin — "Claude for WhatsApp"  (100% ours)

**Vision:** the best AI-assistant WhatsApp plugin on Earth — Claude (Opus) native inside WhatsApp:
Hebrew voice, memory, tools/MCP, automations, multi-channel. Productized, clean, Anthropic-grade.
The from-scratch, owned, sellable version of ClodConnect's WhatsApp piece ([[claude-connect-ai-master]]).

## The honest architecture (iron-rule doctrine: build OUR layer, stand on the rock)
- **OUR layer — 100% from scratch, ours:** orchestration, routing, conversation memory, Hebrew
  STT/TTS, tool/MCP calling, automations, anti-flood, admin UX. This is the product. This is what's ownable.
- **Transport — stand on the rock (don't re-derive Meta's secret protocol):**
  - **Default = official WhatsApp Cloud API** (Meta, documented) → clean, ToS-safe, no bans, sellable/acquirable.
  - Dev/no-business-account fallback = whatsmeow as a transport lib (like everyone, incl. commercial).
  - ❌ NOT re-implementing the WhatsApp multi-device wire protocol from zero (reinventing a planet;
    the exact time/tokens/nerves burn we refuse — and the doctrine says stand on the rock).

## Reuse OUR own modules (the LEGO payoff)
`claude-brain` (key-free Max-CLI shim) · `hebrew-mic` (verified ASR) · `tts` · `cortex-memory` · `comms-hub`.

## Contract (the standard)
`WAPlugin`: `on_message(msg) -> reply`. Pluggable brain, memory, transport. One interface; any transport behind it.

## Roadmap (foundation way: modular, tested, versioned, autosave/LKG)
- v0.1 — webhook receives a WhatsApp message + echoes (transport proven).
- v0.2 — route message → Claude brain (Opus, key-free) → reply in chat.
- v0.3 — + conversation memory (cortex) + Hebrew voice (hebrew-mic + tts).
- v0.4 — + tools/MCP + automations + anti-flood multi-recipient.
- v1.0 — productized: setup wizard, admin UI, docs. The thing worth buying.

## Tests (the sea, isolated)
Every layer gets a `tests/test-*.ps1|py` — transport mocked; brain/memory/contract unit-tested.
