refactor: Update pricing calculator item titles, consolidate visual staging and complex interaction, and revise descriptions for clarity.
Some checks failed
Build & Deploy Mintel Blog / build-and-deploy (push) Failing after 32s
Some checks failed
Build & Deploy Mintel Blog / build-and-deploy (push) Failing after 32s
This commit is contained in:
@@ -330,7 +330,10 @@ Focus 100% on the BRIEFING text provided by the user. Use the DISTILLED_CRAWL on
|
||||
messages: [{ role: 'system', content: pass1SystemPrompt }, { role: 'user', content: pass1UserPrompt }],
|
||||
response_format: { type: 'json_object' }
|
||||
}, { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' } });
|
||||
addUsage(p1Resp.data);
|
||||
if (!p1Resp.data.choices?.[0]?.message?.content) {
|
||||
console.error('❌ Pass 1 failed. Response:', JSON.stringify(p1Resp.data, null, 2));
|
||||
throw new Error('Pass 1: No content in response');
|
||||
}
|
||||
const facts = JSON.parse(cleanJson(p1Resp.data.choices[0].message.content));
|
||||
|
||||
// 2. PASS 2: Feature Deep-Dive
|
||||
@@ -363,6 +366,10 @@ ${JSON.stringify(facts, null, 2)}
|
||||
response_format: { type: 'json_object' }
|
||||
}, { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' } });
|
||||
addUsage(p2Resp.data);
|
||||
if (!p2Resp.data.choices?.[0]?.message?.content) {
|
||||
console.error('❌ Pass 2 failed. Response:', JSON.stringify(p2Resp.data, null, 2));
|
||||
throw new Error('Pass 2: No content in response');
|
||||
}
|
||||
const details = JSON.parse(cleanJson(p2Resp.data.choices[0].message.content));
|
||||
|
||||
// 3. PASS 3: Strategic Content (Bespoke Strategy)
|
||||
@@ -382,7 +389,7 @@ ${tone}
|
||||
- **ABSOLUTE REGEL**: Keine Halluzinationen über fehlende Präsenzen bei Relaunches.
|
||||
- **DATENSCHUTZ**: KEINERLEI namentliche Nennungen von Personen (z. B. "Danny Joseph") in diesen Texten.
|
||||
4. **designVision**: Ein abstraktes, strategisches Konzept.
|
||||
- **STIL**: Rein konzeptionell. Keine Umsetzungsschritte. Keinerlei "To-dos". Sei prägnant.
|
||||
- **STIL**: Rein konzeptionell. Keine Umsetzungsschritte. Keinerlei "To-dos". Keine Ich-Form. Sei prägnant.
|
||||
- **FORM**: EXAKT ZWEI ABSÄTZE. Insgesamt ca. 4 Sätze.
|
||||
- **DATENSCHUTZ**: KEINERLEI namentliche Nennungen von Personen in diesen Texten.
|
||||
- **FOKUS**: Welche strategische Wirkung soll erzielt werden? (Z. B. "Industrielle Souveränität").
|
||||
@@ -402,6 +409,10 @@ ${tone}
|
||||
response_format: { type: 'json_object' }
|
||||
}, { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' } });
|
||||
addUsage(p3Resp.data);
|
||||
if (!p3Resp.data.choices?.[0]?.message?.content) {
|
||||
console.error('❌ Pass 3 failed. Response:', JSON.stringify(p3Resp.data, null, 2));
|
||||
throw new Error('Pass 3: No content in response');
|
||||
}
|
||||
const strategy = JSON.parse(cleanJson(p3Resp.data.choices[0].message.content));
|
||||
|
||||
// 4. PASS 4: Information Architecture (Sitemap)
|
||||
@@ -431,62 +442,58 @@ ${JSON.stringify({ facts, strategy }, null, 2)}
|
||||
response_format: { type: 'json_object' }
|
||||
}, { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' } });
|
||||
addUsage(p4Resp.data);
|
||||
if (!p4Resp.data.choices?.[0]?.message?.content) {
|
||||
console.error('❌ Pass 4 failed. Response:', JSON.stringify(p4Resp.data, null, 2));
|
||||
throw new Error('Pass 4: No content in response');
|
||||
}
|
||||
const ia = JSON.parse(cleanJson(p4Resp.data.choices[0].message.content));
|
||||
|
||||
// 5. PASS 5: Position Synthesis & Pricing Transparency
|
||||
console.log(' ↳ Pass 5: Position Synthesis...');
|
||||
const pass5SystemPrompt = `
|
||||
You are a Senior Solution Architect. Your goal is ABSOLUTE TRANSPARENCY for the customer.
|
||||
Each position in the quote must be perfectly justified and detailed.
|
||||
You are a Senior Solution Architect. Your goal is ABSOLUTE TRANSPARENCY and professionalism.
|
||||
Each position in the quote must be perfectly justified and detailed using an objective, technical tone.
|
||||
|
||||
### POSITION TITLES:
|
||||
"Basis Website Setup", "Individuelle Seiten", "System-Module", "Logik-Funktionen", "Visuelle Inszenierung", "Komplexe Interaktion", "Schnittstellen (API)", "Inhaltsverwaltung (CMS)", "Sorglos-Betrieb (Hosting)".
|
||||
### POSITION TITLES (STRICT - MUST MATCH EXACTLY):
|
||||
"1. Das technische Fundament", "2. Individuelle Seiten", "3. System-Module (Features)", "4. Logik-Funktionen", "5. Schnittstellen (API)", "6. Inhaltsverwaltung (CMS)", "7. Inszenierung & Interaktion", "8. Mehrsprachigkeit", "9. Inhaltliche Initial-Pflege", "10. Laufender Betrieb & Hosting".
|
||||
|
||||
### MAPPING RULES (STRICTLY BASED ON PRICING.MD):
|
||||
- **Basis Website Setup**: Infrastructure, Hosting, SEO-Basics, Cookie-Consent, Staging/Production.
|
||||
- **Individuelle Seiten**: Layout and structure for specific pages (e.g. Home, Services).
|
||||
- **System-Module (Features)**: Closed systems with data structures (Blog, News, Products, Jobs, References).
|
||||
- **Logik-Funktionen**: Pure logic (Search, Filter, Forms, PDF-Export, Multi-lang).
|
||||
- **Visuelle Inszenierung**: Hero-Story, visual flows, Scroll-effects.
|
||||
- **Komplexe Interaktion**: UI-experiences like Configurators or multi-step processes.
|
||||
- **Schnittstellen (API)**: REAL Data Syncs (CRM, ERP, Stripe).
|
||||
- **Inhaltsverwaltung (CMS)**: Setup and mapping for Headless CMS.
|
||||
- **Sorglos-Betrieb (Hosting)**: Hosting, Updates, Backups.
|
||||
### MAPPING RULES (STRICT):
|
||||
- **1. Das technische Fundament**: Infrastructure, Hosting setup, SEO-Basics, Analytics, Environments.
|
||||
- **2. Individuelle Seiten**: Layout/structure for specific pages (Home, About, etc.).
|
||||
- **3. System-Module (Features)**: Functional systems like Blog, News, Products, Jobs, References.
|
||||
- **4. Logik-Funktionen**: Logic modules like Search, Filter, Forms, PDF-Export.
|
||||
- **5. Schnittstellen (API)**: Data Syncs with CRM, ERP, Payment systems.
|
||||
- **6. Inhaltsverwaltung (CMS)**: Setup and mapping for CMS.
|
||||
- **7. Inszenierung & Interaktion**: Hero-stories, visual effects, configurators.
|
||||
- **8. Mehrsprachigkeit**: Architecture scaling for multiple languages.
|
||||
- **9. Inhaltliche Initial-Pflege**: Manual data entry/cleanup.
|
||||
- **10. Laufender Betrieb & Hosting**: Ongoing maintenance, updates, 24/7 monitoring.
|
||||
|
||||
### RULES FOR positionDescriptions (STRICT):
|
||||
1. **NO "ICH-FORM"**: Do NOT use "Ich" or "Mein". Lead with the action or component.
|
||||
2. **CONCISE & ITEM-BASED**: Use short, technical sentences. Focus on WHAT is delivered.
|
||||
3. **ZERO GENERALIZATION**: Do NOT say "Verschiedene Funktionen" or "Optimierte Darstellung". Name the things.
|
||||
1. **ABSOLUTE RULE: NO FIRST PERSON**: NEVER use "Ich", "Mein", "Wir" or "Unser". Lead with nouns or passive verbs.
|
||||
2. **PROFESSIONAL TONE**: Use "Erstellung von...", "Anbindung der...", "Implementierung technischer...", "Bereitstellung von...".
|
||||
3. **CONCISE & ITEM-BASED**: Use technical, high-density sentences. Name specific industry terms from context.
|
||||
4. **ITEMIZED SYNTHESIS**: Mention EVERY component selected in Pass 1.
|
||||
5. **HARD SPECIFICS**: Preserve technical details from the briefing and CURRENT WEBSITE (distilledCrawl). If they mention "HDD-Bohrtechnik" or "110kV Kabelanlagen", IT MUST BE IN THE DESCRIPTION.
|
||||
6. **INDUSTRIAL AMBITION**: Describe it as a high-end technical solution, not a cheap website.
|
||||
7. **SPECIFIC - PAGES**: For "Individuelle Seiten", list the pages as a comma-separated list.
|
||||
8. **SPECIFIC - HOSTING**: Always append: "Inkl. 20GB Speicher."
|
||||
9. **SPECIFIC - LOGIC**: Describe the ACTUAL logic. NEVER use generic terms.
|
||||
10. **STRICT KEYS**: Keys MUST be EXACTLY the ones defined in POSITION TITLES.
|
||||
11. **AGB BAN (CRITICAL)**: NEVER mention "Allgemeine Geschäftsbedingungen" or "AGGs" in any text. They are NOT part of this offer.
|
||||
5. **HARD SPECIFICS**: If the briefing mentions "Glasfaser-Trassen" or "Schwerlast-Logistik", IT MUST BE IN THE DESCRIPTION.
|
||||
6. **INDUSTRIAL AMBITION**: Describe it as a high-end technical solution. Avoid "schöne Website" or marketing fluff.
|
||||
7. **PAGES**: For "2. Individuelle Seiten", list the pages (e.g., "Startseite (Hero-Video), Leistungen, Kontakt").
|
||||
8. **LOGIC**: Describe the ACTUAL logic (e.g., "Volltextsuche mit Auto-Complete", not "eine Suche").
|
||||
9. **KEYS**: Return EXACTLY the keys defined in "POSITION TITLES".
|
||||
10. **NO AGB**: NEVER mention "AGB" or "Geschäftsbedingungen".
|
||||
|
||||
### EXAMPLES (FEW-SHOT):
|
||||
- **BAD**: "Ich entwickle die Seiten: Startseite, Leistungen, Kontakt."
|
||||
- **GOOD**: "Erstellung der Seiten: Startseite (Video-Hero), Über uns (Timeline), Leistungen, Kontakt."
|
||||
- **BAD**: "Ich binde Google Maps an."
|
||||
- **GOOD**: "Native API-Integration von Google Maps mit individueller Standort-Visualisierung."
|
||||
- **BAD**: "Ich programmiere Scroll-Effekte."
|
||||
- **GOOD**: "Visuelle Inszenierung der Meilensteine durch Scroll-aktivierte Timeline-Elemente."
|
||||
|
||||
### POSITION RULES (STRICT):
|
||||
1. **Basis Website Setup**: This position MUST ALWAYS contain exactly these 7 points: "Projekt-Setup & Infrastruktur, Hosting-Bereitstellung, Grundstruktur & Design-Vorlage, technisches SEO-Basics, Analytics (mit automatischem Mail-Report), Testing-, Staging- & Production-Umgebung, Livegang."
|
||||
2. **Sorglos-Betrieb (Hosting)**: Describe the service (Hosting, SSL, Security-Updates, 24/7 Monitoring, Portfolio-Update-Service). NEVER mention "Inklusive Basis-Infrastruktur".
|
||||
3. **LOGIC CONSISTENCY**: If Pass 1 extracted 1 function, you MUST describe exactly 1 function scope. If you describe two things (e.g., "Formular AND Search") but the count is 1, it is a FAIL.
|
||||
4. **SIMPLICITY**: Write in "Simple German". High density of information, but easy for a CEO. No jargon.
|
||||
5. **NO IMPLEMENTATION DETAILS**: Focus on WHAT is done, not HOW (no libraries, no technical "under-the-hood" talk).
|
||||
### EXAMPLES (PASSIVE & TECHNICAL):
|
||||
- **GOOD**: "Konfiguration der CMS-Infrastruktur zur unabhängigen Verwaltung von Produkt-Katalogen und News-Beiträgen."
|
||||
- **GOOD**: "Implementierung einer Volltextsuche inkl. Kategorisierungs-Logik für effizientes Auffinden von Projektreferenzen."
|
||||
- **GOOD**: "Native API-Anbindung an das ERP-System zur Echtzeit-Synchronisation von Bestandsdaten."
|
||||
- **BAD**: "Ich richte dir das CMS ein."
|
||||
- **BAD**: "Ich programmiere eine tolle Suche für deine Seite."
|
||||
|
||||
### DATA CONTEXT:
|
||||
${JSON.stringify({ facts, details, strategy, ia }, null, 2)}
|
||||
|
||||
### OUTPUT FORMAT (Strict JSON):
|
||||
{
|
||||
"positionDescriptions": { "Basis Website Setup": string, ... }
|
||||
"positionDescriptions": { "1. Das technische Fundament": string, ... }
|
||||
}
|
||||
`;
|
||||
const p5Resp = await axios.post('https://openrouter.ai/api/v1/chat/completions', {
|
||||
@@ -495,6 +502,10 @@ ${JSON.stringify({ facts, details, strategy, ia }, null, 2)}
|
||||
response_format: { type: 'json_object' }
|
||||
}, { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' } });
|
||||
addUsage(p5Resp.data);
|
||||
if (!p5Resp.data.choices?.[0]?.message?.content) {
|
||||
console.error('❌ Pass 5 failed. Response:', JSON.stringify(p5Resp.data, null, 2));
|
||||
throw new Error('Pass 5: No content in response');
|
||||
}
|
||||
const positionsData = JSON.parse(cleanJson(p5Resp.data.choices[0].message.content));
|
||||
|
||||
// 6. PASS 6: The Industrial Critic
|
||||
@@ -526,6 +537,10 @@ ${JSON.stringify({ facts, strategy, ia, positionsData }, null, 2)}
|
||||
response_format: { type: 'json_object' }
|
||||
}, { headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' } });
|
||||
addUsage(p6Resp.data);
|
||||
if (!p6Resp.data.choices?.[0]?.message?.content) {
|
||||
console.error('❌ Pass 6 failed. Response:', JSON.stringify(p6Resp.data, null, 2));
|
||||
throw new Error('Pass 6: No content in response');
|
||||
}
|
||||
const reflection = JSON.parse(cleanJson(p6Resp.data.choices[0].message.content));
|
||||
|
||||
// 6. Reflection Merge Utility
|
||||
|
||||
Reference in New Issue
Block a user