feat(gtm): upgrade to v3.1 'Closing-Ready' engine (ROI fix, legal battlecards, senior report mode)

This commit is contained in:
2026-01-20 09:09:37 +00:00
parent 5176ab6e81
commit 05d81efc8a
2 changed files with 271 additions and 185 deletions

View File

@@ -1,4 +1,4 @@
# Dokumentation: GTM Architect Engine (v2.6)
# Dokumentation: GTM Architect Engine (v3.1)
## 1. Projektübersicht
@@ -6,7 +6,9 @@ Der **GTM Architect** ("Go-to-Market Architect") ist ein KI-gestütztes System z
Das System führt den Nutzer durch einen **9-stufigen Prozess** von der technischen Analyse über Business-Case-Modellierung bis hin zu fertigen Vertriebsunterlagen und Landingpages.
## 2. Architektur & Tech-Stack (Stand Jan 2026)
**Aktuelle Version:** v3.1 ("Closing-Ready Edition") - Stand: 20.01.2026
## 2. Architektur & Tech-Stack
Das System ist als Microservice in die bestehende Docker-Umgebung integriert (`gtm-app`).
@@ -63,112 +65,112 @@ Die `call_gemini_image`-Funktion wählt automatisch die beste Methode basierend
* **Modell:** `gemini-2.5-flash-image`.
* **Anwendung:** Platziert ein existierendes Produkt (via Upload) in eine neue, per Text beschriebene Szene. Der Prompt ist darauf optimiert, das Produktdesign nicht zu verändern.
## 4. Der 9-Phasen Prozess
## 4. Der 9-Phasen Prozess (v3.1 Logik)
| Phase | Modus | Input | Output | Beschreibung |
| Phase | Modus | Input | Output | V3.1 Update |
| :--- | :--- | :--- | :--- | :--- |
| **1** | `phase1` | Rohtext / URL | Features, Constraints, **Specs** | Extrahiert technische Daten, **Hard Facts (Specs)** & erstellt DB-Projekt. **Specs sind editierbar.** |
| **2** | `phase2` | Phase 1 Result | ICPs, Data Proxies | Identifiziert ideale Kundenprofile. |
| **3** | `phase3` | Phase 2 Result | Whales, Rollen | Identifiziert Zielkunden & Buying Center. |
| **4** | `phase4` | Phase 1 & 3 | Strategy Matrix | Entwickelt "Angles" und Pain-Points. |
| **5** | `phase5` | Alle Daten | Markdown Report | **Strategie-Fixierung**. Konsolidierter Report inkl. Specs & Phase 2 Insights. |
| **6** | `phase6` | Phase 1, 3, 4 | Battlecards, Prompts | Generiert Einwandbehandlung & Bild-Prompts. |
| **7** | `phase7` | Phase 2, 4 | Landing Page Copy | Erstellt Landingpage-Texte. |
| **8** | `phase8` | Phase 1, 2 | Business Case | CFO-Argumentation, ROI-Logik. |
| **1** | `phase1` | Rohtext / URL | Features, Constraints, **Category** | Autonome Erkennung der Wackler-Kategorie (z.B. Cleaning Indoor Carpet). |
| **2** | `phase2` | Phase 1 Result | ICPs, Data Proxies | Identifiziert ideale Kundenprofile basierend auf Kategorie. |
| **3** | `phase3` | Phase 2 Result | Whales, **Archetypes** | Identifiziert 4 strategische Archetypen (Operativ, Infrastruktur, Eco, Innovation). |
| **4** | `phase4` | Phase 1 & 3 | Strategy Matrix | Wendet "Service Gap" Logik an (Machine vs. Human Service). |
| **5** | `phase5` | Alle Daten | **Senior Report** | Erstellt "Closing-Ready" Report mit Datasheet-Specs & ROI-Range. |
| **6** | `phase6` | Phase 1, 3, 4 | Battlecards, Prompts | **Legal/Liability** Fokus für Infrastruktur-Persona. |
| **7** | `phase7` | Phase 2, 4 | Landing Page Copy | Erstellt Landingpage-Texte mit Wackler-Symbiose. |
| **8** | `phase8` | Phase 1, 2 | **ROI Framework** | Generiert ROI-Formel mit **Example Ranges** (kein "undefined"). |
| **9** | `phase9` | Phase 1, 4 | Feature-to-Value | Übersetzung technischer Features in Nutzen. |
### 4.1 Anleitung: Anpassung der Strategie-Logik (Meta-Framework)
## 5. Changelog & Version History
Das Herzstück der strategischen Qualität der App ist nicht in einer externen Datei gespeichert, sondern wurde als "Meta-Framework" direkt in die Anweisungen (Prompts) für die KI einprogrammiert. Dieses Framework besteht aus den strategischen Schlüsselfragen, die die KI beantworten muss, um eine GTM-Strategie zu erstellen.
* **[MAJOR] v3.1: "Closing-Ready" Edition (Jan 20, 2026)**
* **ROI-Fix:** Phase 8 generiert nun plausible **Wertebereiche** (z.B. "20-30% Reduktion") statt abstrakter Formeln, die zu `undefined` führten.
* **Legal-Härtung:** Phase 6 Battlecards adressieren gezielt **Haftung, DSGVO & DGUV V3** für die "Infrastruktur"-Persona.
* **Technical Depth:** Phase 5 Report fordert nun explizit **alle** technischen Specs (auch Layer-Daten) für eine "Datasheet"-Qualität.
* **Stabilität:** Implementierung von `isinstance(list)` Checks in Phasen 6, 7, 8, um "White Screen of Death" durch Listen-Antworten zu verhindern.
Wenn sich Ihre grundlegende Marketing-Strategie weiterentwickelt, können Sie diese Logik anpassen, indem Sie die Prompts im Code ändern.
* **[MAJOR] v3.0: "Dynamic Service Logic" (Jan 20, 2026)**
* Einführung der **7 Wackler-Kategorien** (Cleaning Indoor/Outdoor, POS, Security, Service, Transport).
* Implementierung der universellen "Machine Layer vs. Human Service Layer" Logik im System-Prompt.
* Konsolidierung auf **4 Buying Center Archetypen**.
**Wichtig:** Dieser Prozess erfordert ein Verständnis der Programm-Logik und sollte sorgfältig durchgeführt werden.
* **[UPGRADE] v2.6.2:** Editierbare Hard Facts & Report Completeness.
* **[UPGRADE] v2.6:** Rich Session Browser & Metadaten-Persistenz.
**Schritt-für-Schritt-Anleitung:**
## 6. GTM Architect V3.1 Prompts (Reference)
1. **Quelldatei identifizieren:** Die gesamte Logik befindet sich in der Datei `gtm_architect_orchestrator.py`.
Dies ist die Referenz der kritischen Prompts, die die "Senior Grade" Qualität der Engine steuern.
2. **Relevante Funktionen finden:** Jede Phase des GTM-Prozesses hat eine eigene Python-Funktion (z.B. `phase2`, `phase3`, `phase4` etc.). Innerhalb jeder dieser Funktionen gibt es eine Variable namens `prompt`. Das ist die Anweisung für die KI.
### 6.1. System Prompt (Universal Service Logic)
Definiert die "Denkweise" der KI. Erkennt autonom die Kategorie und wendet die passende Hybrid-Logik an.
3. **Prompt-Struktur verstehen:** Die Prompts sind so aufgebaut, dass sie der KI strategische Leitplanken geben. Suchen Sie nach dem Abschnitt `**Strategic Questions:**` innerhalb des `prompt`-Blocks.
```python
def get_system_instruction(lang):
return """
# RULE 5: THE "DYNAMIC SERVICE" LOGIC (UNIVERSAL)
First analyze the **category** of the robot and then apply the appropriate hybrid logic:
*Beispiel (Ausschnitt aus `phase2`):*
```python
prompt = f"""
PHASE 2: IDEAL CUSTOMER PROFILE (ICP) & DATA PROXIES - STRATEGIC ANALYSIS
**Your Task:**
Answer the following strategic questions to determine the Ideal Customer Profiles (ICPs).
**Strategic Questions:**
1. **ICP Identification:** Based on the product's core capabilities, which 3 industries face the most significant operational challenges...?
2. **Rationale:** For each identified ICP, provide a concise rationale...
3. **Data Proxies:** How can we find these companies online...?
{lang_instr}
1. CLEANING INDOOR (CARPET) - Vacuums for carpets
* Robot: Does the area (80%).
* Human (Wackler Cleaning): Does edges, corners, spot removal (20%).
**Output:**
Provide your analysis ONLY in the following JSON format:
{{"icps": [...], "dataProxies": [...]}}
2. CLEANING INDOOR (WET SURFACE) - Scrubber dryers (Hard floor)
* Robot: Cleans halls/corridors continuously.
* Human (Wackler Cleaning): Safety check (slip hazard), water change, hygiene audit.
5. SECURITY ROBOT - Mobile Surveillance (Quadruped/Drone)
* Robot: "Detection & Presence". 24/7 patrol, thermal imaging, no fatigue.
* Human (Wackler Security): "Evaluation & Intervention". NSL evaluates alarm, intervention force drives out.
* Pitch: "The robot sees the danger, Wackler eliminates it."
[...weitere Kategorien...]
Mandatory application of this logic in PHASE 4 (Strategy) and PHASE 6 (Sales Enablement).
"""
```
```
4. **Strategische Fragen anpassen:** Sie können die Fragen unter `**Strategic Questions:**` ändern, hinzufügen oder entfernen, um die Denkweise der KI zu steuern. Wenn Sie beispielsweise feststellen, dass die "Data Proxies" präziser sein müssen, könnten Sie die Frage 3 anpassen oder eine vierte Frage hinzufügen.
### 6.2. Phase 5 Prompt (Senior Report Generation)
Erzwingt ausführliche, gut formatierte Reports und verhindert "dünnen" Content.
5. **Output-Struktur beibehalten (KRITISCH!):** Der Teil des Prompts, der mit `**Output:**` beginnt, definiert das JSON-Format, das die Funktion zurückgibt. **Ändern Sie dieses Format NICHT**, da sonst die nachfolgenden Phasen und das Frontend die Daten nicht mehr verarbeiten können. Die Anpassung erfolgt ausschließlich über die strategischen Fragen, die das Ergebnis inhaltlich beeinflussen.
```python
report_sys_instr = """
You are a Senior Business Consultant at a top-tier firm (like McKinsey or BCG).
Your task is to write a strategically deep, detailed "Go-to-Market Strategy Report".
6. **Änderungen bereitstellen:** Nachdem Sie die `gtm_architect_orchestrator.py` gespeichert haben, ist **kein** `docker build` notwendig. Ein einfacher Neustart des Containers aktiviert die neue Logik:
```bash
docker restart gtm-app
```
RULES:
1. **No JSON:** Your output is pure, cleanly formatted Markdown.
2. **Senior Grade:** Do not write "thin" bullet points. Write full sentences...
3. **Completeness:** Never stop in the middle of a table or sentence.
"""
Durch das Befolgen dieser Schritte können Sie die Kernlogik des GTM Architect selbstständig an neue strategische Anforderungen anpassen.
prompt = """
TASK: Write the "GTM STRATEGY REPORT v3.1" in Markdown.
REQUIRED STRUCTURE:
...
3. Product Reality Check (Technical Deep Dive)
* Include ALL available specs... Make it as comprehensive as a technical datasheet.
...
7. Commercial Logic (ROI Framework)
* Example Calculation: Provide a hypothetical example calculation with plausible ranges...
"""
```
## 5. Sitzungs-Management
### 6.3. Phase 6 Prompt (Legal Hardening)
Sorgt für rechtssichere Verkaufsargumente.
Das System verwaltet persistente Sitzungen in der SQLite-Datenbank:
* **List:** Abruf aller gespeicherten Projekte, angereichert mit extrahierten Metadaten wie Produktname, Kategorie und Beschreibung für eine informative Übersicht.
* **Load:** Vollständige Wiederherstellung des App-States (alle Phasen).
* **Delete:** Permanentes Entfernen aus der Datenbank.
```python
prompt = """
1. **Anticipate Objections:** ...
* *Special Focus for 'Infrastructure Responsible' (Gatekeeper):* Address **Legal, Liability & Compliance** issues (e.g. GDPR, DGUV V3, accident liability) specifically.
2. **Formulate Battlecards:** ...
* *Requirement:* Use specific **proof points** (e.g., "Certified according to...", "Data hosted in Germany") instead of generic promises.
"""
```
## 6. Deployment & Betrieb
### 6.4. Phase 8 Prompt (ROI Ranges)
Verhindert "undefined" Fehler durch Forderung von Schätzbereichen.
* **Wichtig:** Das Frontend wird im Build-Stage gebaut. Bei Änderungen an `App.tsx` muss der Container mit `docker-compose up -d --build gtm-app` neu gebaut werden.
* **Backend:** Änderungen an `gtm_architect_orchestrator.py` oder `helpers.py` erfordern keinen Build, nur einen Restart (`docker restart gtm-app`).
## 7. Historie & Fixes (Jan 2026)
* **[UPGRADE] v2.6.2: Report Completeness & Edit Mode**
* **Edit Hard Facts:** Neue Funktion in Phase 1 ("Edit Raw Data") erlaubt die manuelle Korrektur der extrahierten technischen JSON-Daten.
* **Report-Update:** Phase 5 Prompt wurde angepasst, um explizit die Ergebnisse aus Phase 2 (ICPs & Data Proxies) im finalen Report aufzuführen.
* **Backend-Fix:** Korrektur eines Fehlers beim Speichern von JSON-Daten, der auftrat, wenn Datenbank-Inhalte als Strings vorlagen.
* **[UPGRADE] v2.6.1: Stability & UI Improvements**
* **White Screen Fix:** Robuste Absicherung des Frontends gegen `undefined`-Werte beim Laden älterer Sitzungen (`optional chaining`).
* **Session Browser:** Komplettes Redesign der Sitzungsübersicht zu einer übersichtlichen Listenansicht mit Icons (Reinigung/Service/Transport/Security).
* **URL-Anzeige:** Die Quell-URL wird nun als dedizierter Link angezeigt und das Projekt automatisch basierend auf dem erkannten Produktnamen umbenannt.
* **[UPGRADE] v2.6: Rich Session Browser**
* **Neues UI:** Die textbasierte Liste für "Letzte Sitzungen" wurde durch eine dedizierte, kartenbasierte UI (`SessionBrowser.tsx`) ersetzt.
* **Angereicherte Daten:** Jede Sitzungskarte zeigt nun den Produktnamen, die Produktkategorie (mit Icon), eine Kurzbeschreibung und einen Thumbnail-Platzhalter an.
* **Backend-Anpassung:** Die Datenbankabfrage (`gtm_db_manager.py`) wurde erweitert, um diese Metadaten direkt aus der JSON-Spalte zu extrahieren und an das Frontend zu liefern.
* **Verbesserte UX:** Deutlich verbesserte Übersichtlichkeit und schnellere Identifikation von vergangenen Analysen.
* **[UPGRADE] v2.5: Hard Fact Extraction**
* **Phase 1 Erweiterung:** Implementierung eines sekundären Extraktions-Schritts für "Hard Facts" (Specs).
* **Strukturiertes Daten-Schema:** Integration von `templates/json_struktur_roboplanet.txt`.
* **Normalisierung:** Automatische Standardisierung von Einheiten (Minuten, cm, kg, m²/h).
* **Frontend Update:** Neue UI-Komponente zur Anzeige der technischen Daten (Core Data, Layer, Extended Features).
* **Sidebar & Header:** Update auf "ROBOPLANET v2.5".
* **[UPGRADE] v2.4:**
* Dokumentation der Kern-Engine (`helpers.py`) mit Dual SDK & Hybrid Image Generation.
* Aktualisierung der Architektur-Übersicht und Komponenten-Beschreibungen.
* Versionierung an den aktuellen Code-Stand (`v2.4.0`) angepasst.
* **[UPGRADE] v2.3:**
* Einführung der Session History (Datenbank-basiert).
* Implementierung von Markdown-Cleaning (Stripping von Code-Blocks).
* Prompt-Optimierung für tabellarische Markdown-Ausgaben in Phase 5.
* Markdown-File Import Feature.
```python
prompt = """
2. **ROI Formula & Example:** Create a formula: `Net Value = (Savings + Risk Mitigation) - (TCO)`.
* *CRITICAL:* Provide **PLAUSIBLE EXAMPLE RANGES** for efficiency gains (e.g., "Estimate: 20-30% reduction in manual patrol time") instead of just listing the variable.
* **Do NOT output "undefined".** Give a realistic estimation based on the industry context.
"""
```

View File

@@ -1,4 +1,3 @@
import argparse
import base64
import json
@@ -65,27 +64,41 @@ def get_system_instruction(lang):
# CONTEXT: THE WACKLER GROUP ECOSYSTEM
Wir sind Teil der Wackler Group. Wir nutzen das gesamte Dienstleistungsportfolio der Muttergesellschaft, um Hardware-Schwächen in Service-Stärken zu verwandeln.
Unsere Sparten für die Symbiose:
1. Wackler Cleaning: Für Reinigungsroboter (Manuelle Nacharbeit, Winterdienst).
2. Wackler Security: Für Inspektions- & Sicherheitsroboter (Aufschaltung auf NSL/Leitstelle, Revierwachdienst, Intervention).
Das Ziel ist immer eine "Symbiose aus Mensch & Maschine".
# REGEL 5: THE "DYNAMIC HYBRID SERVICE" LOGIC
# REGEL 5: THE "DYNAMIC SERVICE" LOGIC (UNIVERSAL)
Analysiere zuerst die **Kategorie** des Roboters und wende dann die passende Hybrid-Logik an:
FALL A: PRODUKT IST EIN REINIGUNGSROBOTER (z.B. Kehrmaschine)
* Robot Role: Monotone Flächenleistung (80%).
* Human Role (Wackler Cleaning): Kanten, Winterdienst, Sonderreinigung (20%).
* Pitch: "100% Sauberkeit durch Maschine + Mensch."
1. CLEANING INDOOR (CARPET) - Sauger für Teppiche
* Robot: Macht die Fläche (80%).
* Human (Wackler Cleaning): Macht Kanten, Ecken, Fleckenentfernung (20%).
2. CLEANING INDOOR (WET SURFACE) - Scheuersauger (Hartboden)
* Robot: Reinigt Flure/Hallen kontinuierlich.
* Human (Wackler Cleaning): Sicherheits-Check (Rutschgefahr), Wasserwechsel, Hygiene-Audit.
FALL B: PRODUKT IST EIN SICHERHEITS-/INSPEKTIONSROBOTER (z.B. Quadruped, Drohne)
* Robot Role: "Detektion & Präsenz". Der Roboter patrouilliert, nutzt Wärmebild/Sensoren, geht in Gefahrenbereiche. Er wird nicht müde und hat keine Angst.
* Human Role (Wackler Security): "Bewertung & Intervention".
* NSL (Notruf- & Serviceleitstelle): Bewertet den Video-Feed des Roboters bei Alarm.
* Revierwachdienst: Fährt raus zur Intervention, wenn der Roboter einen Eindringling oder Schaden meldet.
* Pitch: "Der Roboter sieht die Gefahr, Wackler beseitigt sie. (Automated Perimeter Protection)."
3. CLEANING OUTDOOR (SWEEPER) - Kehrmaschine (Asphalt)
* Robot: Nimmt Feinstaub und Zigaretten auf.
* Human (Wackler Cleaning): Leert Mülleimer, entfernt Sperrmüll, pflegt Grünanlagen.
Wende diese Logik zwingend in PHASE 4 (Strategy) und PHASE 6 (Sales Enablement) an.
Wenn der Roboter ein Sicherheitsroboter ist, adressiere "Head of Security" und "Werkschutzleiter" als Buyer Persona.
4. POS ROBOTER - Retail/Airport Assistenz
* Robot: Information, Wegweiser, Blickfang.
* Human (Wackler Service): Beratung, Verkauf, emotionale Kundenbindung.
5. SECURITY ROBOTER - Mobile Überwachung (Quadruped/Drohne)
* Robot: "Detektion & Präsenz". 24/7 Patrouille, Wärmebild, keine Müdigkeit.
* Human (Wackler Security): "Bewertung & Intervention". NSL bewertet Alarm, Interventionskraft fährt raus.
* Pitch: "Der Roboter sieht die Gefahr, Wackler beseitigt sie."
6. SERVICE ROBOTER - Transport (Gastro/Klinik)
* Robot: Schweres Tragen (Tabletts, Wäsche) von A nach B.
* Human (Wackler Service): Patientenkontakt, Tisch-Service, Hygiene.
7. TRANSPORT ROBOTER - Intralogistik (Lager)
* Robot: Paletten-Transport, Milkrun.
* Human (Wackler Logistics): Prozesssteuerung, Ausnahmebehandlung, Umpacken.
Wende diese spezifische Logik zwingend in PHASE 4 (Strategy) und PHASE 6 (Sales Enablement) an.
WICHTIG: Antworte IMMER in der vom User geforderten Sprache (Deutsch), auch wenn der Input Englisch ist.
"""
@@ -100,27 +113,43 @@ def get_system_instruction(lang):
# CONTEXT: THE WACKLER GROUP ECOSYSTEM
We are part of the Wackler Group. We leverage the full service portfolio of the parent company to turn hardware weaknesses into service strengths.
Our divisions for symbiosis:
1. Wackler Cleaning: For cleaning robots (manual rework, winter service).
2. Wackler Security: For inspection & security robots (connection to NSL/control center, mobile patrol service, intervention).
The goal is always a "Symbiosis of Man & Machine".
# RULE 5: THE "DYNAMIC HYBRID SERVICE" LOGIC
# RULE 5: THE "DYNAMIC SERVICE" LOGIC (UNIVERSAL)
First analyze the **category** of the robot and then apply the appropriate hybrid logic:
CASE A: PRODUCT IS A CLEANING ROBOT (e.g. Sweeper)
* Robot Role: Monotonous area performance (80%).
* Human Role (Wackler Cleaning): Edges, winter service, special cleaning (20%).
* Pitch: "100% Cleanliness through Machine + Human."
1. CLEANING INDOOR (CARPET) - Vacuums for carpets
* Robot: Does the area (80%).
* Human (Wackler Cleaning): Does edges, corners, spot removal (20%).
2. CLEANING INDOOR (WET SURFACE) - Scrubber dryers (Hard floor)
* Robot: Cleans halls/corridors continuously.
* Human (Wackler Cleaning): Safety check (slip hazard), water change, hygiene audit.
CASE B: PRODUCT IS A SECURITY/INSPECTION ROBOT (e.g. Quadruped, Drone)
* Robot Role: "Detection & Presence". The robot patrols, uses thermal imaging/sensors, enters hazardous areas. It does not get tired and has no fear.
* Human Role (Wackler Security): "Evaluation & Intervention".
* NSL (Emergency & Service Control Center): Evaluates the robot's video feed in case of alarm.
* Mobile Patrol: Drives out for intervention if the robot reports an intruder or damage.
* Pitch: "The robot sees the danger, Wackler eliminates it. (Automated Perimeter Protection)."
3. CLEANING OUTDOOR (SWEEPER) - Sweepers (Asphalt)
* Robot: Picks up fine dust and cigarettes.
* Human (Wackler Cleaning): Empties bins, removes bulky waste, maintains greenery.
4. POS ROBOT - Retail/Airport Assistance
* Robot: Information, wayfinding, eye-catcher.
* Human (Wackler Service): Consultation, sales, emotional customer bonding.
5. SECURITY ROBOT - Mobile Surveillance (Quadruped/Drone)
* Robot: "Detection & Presence". 24/7 patrol, thermal imaging, no fatigue.
* Human (Wackler Security): "Evaluation & Intervention". NSL evaluates alarm, intervention force drives out.
* Pitch: "The robot sees the danger, Wackler eliminates it."
6. SERVICE ROBOT - Transport (Hospitality/Clinic)
* Robot: Heavy lifting (trays, laundry) from A to B.
* Human (Wackler Service): Patient contact, table service, hygiene.
7. TRANSPORT ROBOT - Intralogistics (Warehouse)
* Robot: Pallet transport, milkrun.
* Human (Wackler Logistics): Process control, exception handling, repacking.
Mandatory application of this logic in PHASE 4 (Strategy) and PHASE 6 (Sales Enablement).
If the robot is a security robot, address "Head of Security" and "Plant Security Manager" as Buyer Persona.
IMPORTANT: Always answer in the requested language.
"""
def get_output_lang_instruction(lang):
@@ -201,11 +230,12 @@ def phase1(payload):
Task:
1. Extract and CONSOLIDATE technical features into 8-12 high-level core capabilities or value propositions. Group minor specs (e.g., specific ports like USB/Ethernet) into broader categories (e.g., "Connectivity & Integration"). Do NOT list every single hardware spec individually. Focus on what matters for the buyer.
2. Define hard constraints (e.g., physical dimensions, max payload, environment limitations).
3. Check for internal portfolio conflicts (hypothetical product "Scrubber 5000").
3. Classify the product into one of the 7 Wackler Categories: [Cleaning Indoor (Carpet), Cleaning Indoor (Wet), Cleaning Outdoor (Sweeper), POS Robot, Security Robot, Service Robot, Transport Robot].
4. Check for internal portfolio conflicts (hypothetical product "Scrubber 5000").
{lang_instr}
Output JSON format ONLY: {{"features": [], "constraints": [], "conflictCheck": {{"hasConflict": false, "details": "", "relatedProduct": ""}}, "rawAnalysis": ""}}
Output JSON format ONLY: {{"features": [], "constraints": [], "category": "Identified Category", "conflictCheck": {{"hasConflict": false, "details": "", "relatedProduct": ""}}, "rawAnalysis": ""}}
"""
log_and_save(project_id, "phase1", "prompt", prompt)
response = call_gemini_flash(prompt, system_instruction=sys_instr, json_mode=True)
@@ -348,7 +378,7 @@ def phase2(payload):
Answer the following strategic questions to determine the Ideal Customer Profiles (ICPs).
**Strategic Questions:**
1. **ICP Identification:** Based on the product's core capabilities, which 3 industries face the most significant operational challenges (e.g., safety, efficiency, high manual labor costs, security risks) that this product directly solves? Think about where the economic or safety impact is highest.
1. **ICP Identification:** Based on the product's category ({phase1_data.get('category', 'Unknown')}), which 3 industries face the most significant operational challenges (e.g., safety, efficiency, high manual labor costs, security risks) that this product directly solves?
2. **Rationale:** For each identified ICP, provide a concise rationale. Why is this product a perfect fit for this specific industry? (e.g., "Reduces inspection costs by X%", "Improves safety in hazardous environments", "Automates a critical but repetitive task").
3. **Data Proxies:** How can we find these companies online? What specific digital footprints (data proxies) do they leave? Think about:
* Keywords on their websites (e.g., 'plant safety', 'autonomous inspection', 'logistics automation').
@@ -387,18 +417,17 @@ def phase3(payload):
**Strategic Questions:**
1. **Whale Identification:** For each ICP, identify 3-5 specific 'Whale' companies in the DACH market. These should be leaders, innovators, or companies with significant scale in that sector.
2. **Buying Center Roles:** For a technology investment of this scale, define the key roles within a typical customer's Buying Center. Use these specific archetypes and identify plausible job titles for each:
* **Decider:** The person with the final budget authority (e.g., Plant Manager, CEO, Head of Operations).
* **Evaluator:** The technical expert who vets the solution (e.g., Head of Engineering, IT Security Lead, Facility Manager).
* **User:** The person or team who will use the product day-to-day (e.g., Security Staff, Maintenance Crew).
* **Influencer:** A person with a strong opinion who can sway the decision (e.g., Head of Safety, Innovation Manager).
* **Gatekeeper:** A person who controls the flow of information (e.g., IT Administration, Purchasing Department).
2. **Buying Center Roles:** Identify the specific job titles for the 4 Universal Strategic Archetypes in the context of these industries.
* **Operativer Entscheider:** Who feels the pain daily? (e.g., Plant Manager, Store Manager, Head of Logistics).
* **Infrastruktur Verantwortlicher:** Who has to integrate it? (e.g., IT Security, Facility Manager, Legal/Compliance).
* **Wirtschaftlicher Entscheider:** Who signs the check? (e.g., CFO, Purchasing Director).
* **Innovations-Treiber:** Who pushes for the pilot? (e.g., CDO, Strategy Lead).
{lang_instr}
**Output:**
Provide your analysis ONLY in the following JSON format:
{{"whales": [{{"industry": "ICP Name", "accounts": ["Company A", "Company B"]}}], "roles": ["Role Archetype: Plausible Job Title 1, Plausible Job Title 2"]}}
{{"whales": [{{"industry": "ICP Name", "accounts": ["Company A", "Company B"]}}], "roles": ["Operativer Entscheider: [Job Titles]", "Infrastruktur Verantwortlicher: [Job Titles]", "Wirtschaftlicher Entscheider: [Job Titles]", "Innovations-Treiber: [Job Titles]"]}}
"""
log_and_save(project_id, "phase3", "prompt", prompt)
response = call_gemini_flash(prompt, system_instruction=sys_instr, json_mode=True)
@@ -423,25 +452,23 @@ def phase4(payload):
prompt = f"""
PHASE 4: STRATEGY & ANGLE DEVELOPMENT - STRATEGIC ANALYSIS
**Target Industries & Companies:**
{json.dumps([w.get('industry') for w in phase3_data.get('whales', [])])}
**Product Features:**
{json.dumps(phase1_data.get('features'))}
**Product Category:** {phase1_data.get('category')}
**Target Industries:** {json.dumps([w.get('industry') for w in phase3_data.get('whales', [])])}
**Product Features:** {json.dumps(phase1_data.get('features'))}
**Your Task:**
Answer the following strategic questions to build the core of our market approach.
**Strategic Questions:**
1. **Pain Point Analysis:** For each industry segment, what is the single most significant, measurable **Pain Point** this product solves? Frame it from the customer's operational perspective (e.g., "High rate of safety incidents during manual inspections", "Production downtime due to undetected equipment failure", "Inefficient inventory tracking").
2. **Develop the Angle:** What is our unique story or perspective for this segment? The "Angle" should directly connect a product capability to their primary pain point.
3. **Define Differentiation:** Why should they choose us over a competitor or simply doing nothing? You **must** connect this to our unique "Dynamic Hybrid Service" logic (the combination of robot capabilities and human expert services).
1. **Pain Point Analysis:** For each industry segment, what is the single most significant, measurable **Pain Point** this product solves?
2. **Develop the Angle:** What is our unique story? The "Angle" should directly connect a product capability to their primary pain point.
3. **Define Differentiation (Hybrid Service):** Why should they choose us? Explain the specific "Service Gap" that our Hybrid Model (Machine + Human) closes for this specific Category ({phase1_data.get('category')}). E.g., for Security, the gap is "Intervention"; for Cleaning, it is "Edges/Hygiene".
{lang_instr}
**Output:**
Provide your analysis ONLY in the following JSON format:
{{"strategyMatrix": [{{"segment": "Target Industry", "painPoint": "The core problem.", "angle": "Our unique story.", "differentiation": "Why us (Hybrid Service)."}}]}}
{{"strategyMatrix": [{{"segment": "Target Industry", "painPoint": "The core problem.", "angle": "Our unique story.", "differentiation": "Why us (Hybrid Service logic)."}}]}}
"""
log_and_save(project_id, "phase4", "prompt", prompt)
response = call_gemini_flash(prompt, system_instruction=sys_instr, json_mode=True)
@@ -462,7 +489,31 @@ def phase5(payload):
strat_matrix = phase4_data.get('strategyMatrix', [])
logging.info(f"Phase 5 Input Check - Strategy Matrix Rows: {len(strat_matrix)}")
sys_instr = get_system_instruction(lang)
# SPEZIAL-INSTRUKTION FÜR PHASE 5 (REPORTING)
# Wir überschreiben hier die globale JSON-Instruktion, um ausführlichen Text zu erzwingen.
if lang == 'de':
report_sys_instr = """
Du bist ein Senior Business Consultant bei einer Top-Tier-Beratung (wie McKinsey oder BCG).
Deine Aufgabe ist es, einen strategisch tiefgehenden, detaillierten "Go-to-Market Strategy Report" zu verfassen.
REGELN:
1. **Kein JSON:** Deine Ausgabe ist reines, sauber formatiertes Markdown.
2. **Senior Grade:** Schreibe nicht stichpunktartig "dünn", sondern formuliere ganze Sätze und erkläre die Zusammenhänge ("Why it matters").
3. **Vollständigkeit:** Brich niemals mitten in einer Tabelle oder einem Satz ab.
4. **Formatierung:** Nutze Fettgedrucktes, Listen und Tabellen, um die Lesbarkeit zu erhöhen.
"""
else:
report_sys_instr = """
You are a Senior Business Consultant at a top-tier firm (like McKinsey or BCG).
Your task is to write a strategically deep, detailed "Go-to-Market Strategy Report".
RULES:
1. **No JSON:** Your output is pure, cleanly formatted Markdown.
2. **Senior Grade:** Do not write "thin" bullet points. Write full sentences and explain the context ("Why it matters").
3. **Completeness:** Never stop in the middle of a table or sentence.
4. **Formatting:** Use bolding, lists, and tables to enhance readability.
"""
lang_instr = get_output_lang_instruction(lang)
# Reduziere Input-Daten auf das Wesentliche, um den Output-Fokus zu verbessern
@@ -470,7 +521,8 @@ def phase5(payload):
lean_phase1 = {
"features": phase1_data.get('features', []),
"constraints": phase1_data.get('constraints', []),
"specs": phase1_data.get('specs', {})
"specs": phase1_data.get('specs', {}),
"category": phase1_data.get('category', 'Unknown')
}
prompt = f"""
@@ -479,41 +531,63 @@ def phase5(payload):
INPUT DATA:
- Product: {json.dumps(lean_phase1)}
- ICPs: {json.dumps(phase2_data.get('icps', []))}
- Data Proxies: {json.dumps(phase2_data.get('dataProxies', []))}
- Targets: {json.dumps(phase3_data.get('whales', []))}
- Strategy Matrix: {json.dumps(phase4_data.get('strategyMatrix', []))}
TASK:
Write a professional "GTM STRATEGY REPORT" in Markdown.
REQUIRED STRUCTURE:
1. **Executive Summary**: A brief strategic overview.
2. **Product Analysis**: Key features & constraints.
3. **Technical Specifications (Hard Facts)**:
- Create a dedicated section displaying the technical data (Dimensions, Weight, Runtime, Layers, etc.) found in 'Product.specs'.
- Use a clear Markdown table or bullet points.
4. **Phase 2: ICP Discovery**:
- Present the selected ICPs (Industries) and the rationale behind them.
- List the identified Data Proxies used to find these customers.
5. **Target Accounts**: Top companies (Whales).
6. **Strategy Matrix**:
- Create a STRICT Markdown table.
- Columns: Segment | Pain Point | Angle | Differentiation
- Template:
| Segment | Pain Point | Angle | Differentiation |
| :--- | :--- | :--- | :--- |
| [Content] | [Content] | [Content] | [Content] |
- Use the data from the 'Strategy Matrix' input.
- Do NOT use newlines inside table cells (use <br> instead) to keep the table structure intact.
7. **Next Steps**: Actionable recommendations.
8. **Hybrid Service Logic**: Explain the machine/human symbiosis.
Write the "GTM STRATEGY REPORT v3.1" in Markdown.
Expand on the input data. Don't just copy it. Interpret it.
REQUIRED STRUCTURE & CONTENT:
# GTM STRATEGY REPORT v3.1
## 1. Strategic Core
* **Category Definition:** Explicitly state that this product falls under the '{lean_phase1.get('category')}' category.
* **Dynamic Service Logic:** Explain clearly how the "Machine Layer" (What the robot does) and the "Human Service Layer" (What Wackler does) work together for THIS specific category. Use the logic defined for '{lean_phase1.get('category')}'.
## 2. Executive Summary
* Write a compelling management summary (approx. 150 words) outlining the market opportunity and the core value proposition.
## 3. Product Reality Check (Technical Deep Dive)
* **Core Capabilities:** Summarize the top 3-5 capabilities.
* **Technical Constraints:** Create a detailed Markdown table for the Hard Facts.
* Include ALL available specs (Dimensions, Weight, Runtime, Limits, Sensor types, Cleaning performance, etc.) from the input.
* Make it as comprehensive as a technical datasheet to satisfy the "Evaluator" persona.
| Feature | Value | Implication |
| :--- | :--- | :--- |
| ... | ... | ... |
## 4. Target Architecture (ICPs)
* For each ICP, write a short paragraph explaining the "Strategic Fit". Why is this industry under pressure to buy?
* Mention key "Whale" accounts identified.
## 5. Strategy Matrix
* Create a detailed Markdown table mapping the strategy.
* **CRITICAL:** Ensure the table syntax is perfect. use <br> for line breaks inside cells.
* Columns: **Target Segment** | **The Pain (Operational)** | **The Angle (Story)** | **Differentiation (Service Gap)**
* Fill this table with the data from the 'Strategy Matrix' input.
## 6. Operational GTM Roadmap
* **Step 1: Lead Gen:** Recommend specific Inbound/Outbound tactics for these ICPs.
* **Step 2: Consultative Sales:** How to handle the site-check? What constraints need checking?
* **Step 3: Proof of Value:** Define the Pilot Phase (Paid Pilot vs. Free PoC).
* **Step 4: Expansion:** Path to RaaS/Service contracts.
## 7. Commercial Logic (ROI Framework)
* Present the ROI calculation logic.
* **The Formula:** Show the Net Value formula.
* **Input Variables:** List the specific variables the customer needs to provide.
* **Example Calculation:** Provide a hypothetical example calculation with plausible ranges (e.g. "Assuming 20-30% efficiency gain...") to illustrate the potential.
{lang_instr}
Output: Return strictly MARKDOWN formatted text. Start with "# GTM STRATEGY REPORT".
Output: Return strictly MARKDOWN formatted text.
"""
log_and_save(project_id, "phase5", "prompt", prompt)
report = call_gemini_flash(prompt, system_instruction=sys_instr, json_mode=False)
# Use the specialized system instruction here!
report = call_gemini_flash(prompt, system_instruction=report_sys_instr, json_mode=False)
# Clean up potentially fenced markdown code blocks
report = report.strip()
@@ -551,20 +625,24 @@ def phase6(payload):
Answer the following strategic questions to create sales enablement materials.
**Strategic Questions:**
1. **Anticipate Objections:** For each key Buying Center persona, what is their most likely and critical **objection**? What is the core reason they would hesitate or say "no" to this investment?
2. **Formulate Battlecards:** For each objection, formulate a concise and powerful **response script**. The script should first acknowledge their concern, then reframe the issue, and finally present our solution as the clear, logical answer, quantifying the benefit where possible.
3. **Create Visual Prompts:** For the top 3 use cases, write a detailed **visual prompt** for an image generation AI. The prompt must describe a photorealistic scene that visually communicates the product's primary value proposition in that specific industry context. It should be clear what the robot is doing and what the positive outcome is.
1. **Anticipate Objections:** For each of the 4 key Archetypes (Operative, Infrastructure, Economic, Innovation), what is their most likely and critical **objection**?
* *Special Focus for 'Infrastructure Responsible' (Gatekeeper):* Address **Legal, Liability & Compliance** issues (e.g. GDPR, DGUV V3, accident liability) specifically.
2. **Formulate Battlecards:** For each objection, formulate a concise **response script**.
* *Requirement:* Use specific **proof points** (e.g., "Certified according to...", "Data hosted in Germany", "Insurance coverage by Wackler") instead of generic promises.
3. **Create Visual Prompts:** For the top 3 use cases, write a detailed **visual prompt** for an image generation AI.
{lang_instr}
**Output:**
Provide your analysis ONLY in the following JSON format:
{{"battlecards": [{{"persona": "Buying Center Role", "objection": "The key objection.", "responseScript": "The compelling response."}}], "visualPrompts": [{{"title": "Image Title", "context": "Use case description.", "prompt": "Detailed photorealistic prompt."}}]}}
{{"battlecards": [{{"persona": "Archetype (Job Title)", "objection": "The key objection.", "responseScript": "The compelling response with proof points."}}], "visualPrompts": [{{"title": "Image Title", "context": "Use case description.", "prompt": "Detailed photorealistic prompt."}}]}}
"""
log_and_save(project_id, "phase6", "prompt", prompt)
response = call_gemini_flash(prompt, system_instruction=sys_instr, json_mode=True)
log_and_save(project_id, "phase6", "response", response)
data = json.loads(response)
if isinstance(data, list):
data = data[0]
db_manager.save_gtm_result(project_id, 'phase6_result', json.dumps(data))
return data
@@ -604,6 +682,8 @@ def phase7(payload):
response = call_gemini_flash(prompt, system_instruction=sys_instr, json_mode=True)
log_and_save(project_id, "phase7", "response", response)
data = json.loads(response)
if isinstance(data, list):
data = data[0]
db_manager.save_gtm_result(project_id, 'phase7_result', json.dumps(data))
return data
@@ -617,30 +697,34 @@ def phase8(payload):
lang_instr = get_output_lang_instruction(lang)
prompt = f"""
PHASE 8: BUSINESS CASE BUILDER (THE CFO PITCH) - STRATEGIC ANALYSIS
PHASE 8: COMMERCIAL LOGIC & ROI CALCULATOR - STRATEGIC ANALYSIS
**Context:**
- Product Category: {phase1_data.get('category')}
- ICPs: {json.dumps(phase2_data.get('icps'))}
- Features: {json.dumps(phase1_data.get('features'))}
**Your Task:**
Develop the financial argumentation for each ICP by answering the following questions.
Develop a calculation framework (NOT just random numbers) for the CFO pitch.
**Strategic Questions:**
1. **Identify the Cost Driver:** What is the primary, quantifiable **cost driver** that our product addresses in this industry? (e.g., "High labor costs for manual inspections", "Financial losses from production downtime", "Insurance premiums due to safety incidents").
2. **Quantify Efficiency Gains:** How, specifically, does our product create a positive financial impact? Estimate the **efficiency gain** in plausible percentages or saved hours/costs. (e.g., "Reduces manual inspection time by 50%", "Prevents costly downtime worth an estimated X€ per hour").
3. **Formulate the Risk Argument:** How does our solution mitigate significant operational, financial, or safety **risks**? Frame this as a form of financial protection or cost avoidance. (e.g., "Mitigates the multi-million dollar risk of an environmental incident by providing early leak detection.").
1. **Identify the Cost Driver:** What is the unit of cost we are attacking?
2. **ROI Formula & Example:** Create a formula: `Net Value = (Savings + Risk Mitigation) - (TCO)`.
* *CRITICAL:* Provide **PLAUSIBLE EXAMPLE RANGES** for efficiency gains (e.g., "Estimate: 20-30% reduction in manual patrol time") instead of just listing the variable.
* **Do NOT output "undefined".** Give a realistic estimation based on the industry context.
3. **Risk Argument:** Financial value of avoiding the worst-case scenario.
{lang_instr}
**Output:**
Provide your analysis ONLY in the following JSON format:
{{"businessCases": [{{"industry": "ICP Name", "costDriver": "The primary financial pain.", "efficiencyGain": "The quantifiable gain.", "riskArgument": "The cost of inaction."}}]}}
{{"businessCases": [{{"industry": "ICP Name", "costDriver": "Unit of cost.", "efficiencyGain": "Plausible estimate range (e.g. 25-35%).", "roiFormula": "The formula with defined variables.", "riskArgument": "The cost of inaction."}}]}}
"""
log_and_save(project_id, "phase8", "prompt", prompt)
response = call_gemini_flash(prompt, system_instruction=sys_instr, json_mode=True)
log_and_save(project_id, "phase8", "response", response)
data = json.loads(response)
if isinstance(data, list):
data = data[0]
db_manager.save_gtm_result(project_id, 'phase8_result', json.dumps(data))
return data
@@ -661,13 +745,13 @@ def phase9(payload):
- Strategy Pains: {json.dumps([s.get('painPoint') for s in phase4_data.get('strategyMatrix', [])])}
**Your Task:**
Translate technical features into compelling, value-oriented benefits by following this structured process for each key feature.
Translate technical features into compelling, value-oriented benefits.
**Structured Process:**
1. **State the Feature:** Pick a key technical feature.
2. **Ask "So what?" (The Consequence):** What is the immediate consequence or capability that this feature enables?
3. **Ask "So what?" again (The Value):** What is the ultimate, tangible **value** or **benefit** that the consequence delivers to the customer? How does it solve one of their core pain points? This is the "Story".
4. **Formulate Headline:** Create a short, powerful, jargon-free **headline** that encapsulates this final value.
2. **Ask "So what?" (The Consequence):** What is the immediate consequence?
3. **Ask "So what?" again (The Value):** What is the ultimate benefit?
4. **Formulate Headline:** Short, powerful headline.
{lang_instr}
@@ -822,4 +906,4 @@ def main():
sys.exit(1)
if __name__ == "__main__":
main()
main()