# CLAUDE.md - AI Sales Agent System Architecture & Directory Blueprint

## Project Context & Architecture
This is a production-grade, subscription-free AI Sales Agent for a high-ticket infrastructure company operating in two high-trust verticals: Solar Solutions and Borehole Drilling Services.

### Core Stack
- **Runtime & Framework:** Node.js (ES6 Modules, `"type": "module"`) with Express.
- **AI Integration Layer:** Anthropic Model Context Protocol (MCP) using `@modelcontextprotocol/sdk`.
- **Hosting Environment:** Hosted directly on a secure domain over HTTPS.
- **Upstream Trigger:** Meta Business Suite Webhook (WhatsApp Cloud API integration).

---

## Target Directory Structure
Claude Code must strictly implement and maintain the following modular folder layout:

```text
├── CLAUDE.md                 # This system development architecture guide
├── .env                      # Local runtime secrets (never commit to source)
├── package.json              # App configuration & modern ES6 modules spec
├── webhook.js                # Live entrypoint for Meta's HTTP Webhook notifications
└── src/
    ├── mcp/
    │   ├── mcpServer.js      # Host process configuring the @modelcontextprotocol/sdk
    │   └── tools.js          # Definitions/schemas for tools exposed to Claude
    ├── services/
    │   └── whatsapp.js       # Outbound HTTPS engine executing official Meta Cloud API calls
    └── agent/
        ├── pipeline.js       # Core orchestration tying Webhook -> Claude API -> MCP Tool
        └── prompts.js        # Strict system prompts for Solar vs Borehole domains