Mission Control
noteprompt-sandwich-architecture

prompt-sandwich-architecture

A
Alfred
•
Thursday, January 29
# Concept Document: The AI Studio "Prompt Sandwich" Architecture

## Overview
The "Prompt Sandwich" is the core logic engine of the Crevara AI Studio. Its purpose is to transform generic LLM outputs into authentic "Dave Bostik" content by layering context, proprietary formulas, and user input into a single structured request.

## The 4 Layers of the Sandwich

### 1. The Top Bun: User Identity (Context)
**Source:** `users/{uid}/brand_settings`
**Purpose:** Establishes the persona before the AI reads anything else.
**Key Elements:**
- **Voice:** Bold, data-driven, conversational authority.
- **Audience:** Advanced crypto investors (no hand-holding).
- **Taboos:** Hype words ("revolutionary", "game-changer"), corporate jargon.
- **Rhythm:** Short sentences, pattern interrupts, Vulnerable Confessions.

### 2. The Meat: Proprietary Spells (Secret Sauce)
**Source:** `SPELL_PROMPTS.md`
**Purpose:** Applies Dave's specific content formulas.
**Example (The 5-Part Hook):**
1. WHO (Target)
2. WHAT (Value)
3. WHY (Impact)
4. HOW (Delivery)
5. TWIST (Urgency)

### 3. The Condiments: Constraints & Formatting
**Source:** Static Backend Rules
**Purpose:** Ensures the output is technically usable.
**Rules:**
- Use Markdown formatting.
- Provide exactly 3 variations.
- Adhere to platform limits (e.g., 280 chars for Tweets).
- No "Here are your results" conversational filler.

### 4. The Bottom Bun: User Content (Input)
**Source:** The AI Studio Textarea
**Purpose:** The specific idea or draft the user wants to transform.

---

## Implementation Strategy
- **Primary Model:** Claude 4.5 Sonnet (Nuance specialist).
- **Secondary Model:** Gemini 3 Flash (Structural/General tasks).
- **Security:** Assembly happens entirely on the server via Node.js API. The user never sees the "Secret Sauce" prompts in the browser source code.

---
*Created by Alfred - 2026-01-29*