refactor: Remove numerical prefixes from pricing calculator position titles.
Some checks failed
Build & Deploy Mintel Blog / build-and-deploy (push) Failing after 28s

This commit is contained in:
2026-02-05 10:42:47 +01:00
parent c5ad6108ee
commit 190720ad92
5 changed files with 74 additions and 74 deletions

View File

@@ -533,16 +533,16 @@ ${JSON.stringify({ facts, strategy }, null, 2)}
// Determine which positions are actually relevant to avoid hallucinations
const requiredPositions = [
"1. Das technische Fundament",
facts.selectedPages.length + facts.otherPages.length > 0 ? "2. Individuelle Seiten" : null,
facts.features.length > 0 ? "3. System-Module (Features)" : null,
facts.functions.length > 0 ? "4. Logik-Funktionen" : null,
facts.apiSystems.length > 0 ? "5. Schnittstellen (API)" : null,
facts.cmsSetup ? "6. Inhaltsverwaltung (CMS)" : null,
"7. Inszenierung & Interaktion", // Always include for high-end strategy
facts.multilang ? "8. Mehrsprachigkeit" : null,
"9. Inhaltliche Initial-Pflege",
"10. Sorglos-Paket (Betrieb & Pflege)"
"Das technische Fundament",
facts.selectedPages.length + facts.otherPages.length > 0 ? "Individuelle Seiten" : null,
facts.features.length > 0 ? "System-Module (Features)" : null,
facts.functions.length > 0 ? "Logik-Funktionen" : null,
facts.apiSystems.length > 0 ? "Schnittstellen (API)" : null,
facts.cmsSetup ? "Inhaltsverwaltung (CMS)" : null,
"Inszenierung & Interaktion", // Always include for high-end strategy
facts.multilang ? "Mehrsprachigkeit" : null,
"Inhaltliche Initial-Pflege",
"Sorglos-Paket (Betrieb & Pflege)"
].filter(Boolean);
const pass5SystemPrompt = `
@@ -553,16 +553,16 @@ Each position in the quote must be perfectly justified and detailed using an obj
${requiredPositions.map(p => `"${p}"`).join(", ")}
### MAPPING RULES (STRICT):
- ** 1. Das technische Fundament **: Infrastructure, Hosting setup, SEO-Basics, Analytics, Environments.
- ** 2. Individuelle Seiten **: Layout / structure for specific pages. ** RULE **: If quantity is high (e.g. > 10), lead with "Umsetzung von [QTY] individuellen Einzelseiten...".
- ** 3. System-Module (Features) **: Functional systems like Blog, News, Products, Jobs, References. ** RULE **: Describe exactly 1 thing if qty is 1. If qty is 0, DO NOT DESCRIBE THIS.
- ** 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. Sorglos-Paket (Betrieb & Pflege) **: ** RULE **: Describe as "1 Jahr Sicherung des technischen Betriebs, Instandhaltung, Sicherheits-Updates und Inhalts-Aktualisierungen gemäß AGB Punkt 7a."
- ** Das technische Fundament **: Infrastructure, Hosting setup, SEO-Basics, Analytics, Environments.
- ** Individuelle Seiten **: Layout / structure for specific pages. ** RULE **: If quantity is high (e.g. > 10), lead with "Umsetzung von [QTY] individuellen Einzelseiten...".
- ** System-Module (Features) **: Functional systems like Blog, News, Products, Jobs, References. ** RULE **: Describe exactly 1 thing if qty is 1. If qty is 0, DO NOT DESCRIBE THIS.
- ** Logik-Funktionen **: Logic modules like Search, Filter, Forms, PDF-Export.
- ** Schnittstellen (API) **: Data Syncs with CRM, ERP, Payment systems.
- ** Inhaltsverwaltung (CMS) **: Setup and mapping for CMS.
- ** Inszenierung & Interaktion **: Hero-stories, visual effects, configurators.
- ** Mehrsprachigkeit **: Architecture scaling for multiple languages.
- ** Inhaltliche Initial-Pflege **: Manual data entry / cleanup.
- ** Sorglos-Paket (Betrieb & Pflege) **: ** RULE **: Describe as "1 Jahr Sicherung des technischen Betriebs, Instandhaltung, Sicherheits-Updates und Inhalts-Aktualisierungen gemäß AGB Punkt 7a."
### RULES FOR positionDescriptions(STRICT):
1. ** ABSOLUTE RULE: NO FIRST PERSON **: NEVER use "Ich", "Mein", "Wir" or "Unser". Lead with nouns or passive verbs.
@@ -574,7 +574,7 @@ ${requiredPositions.map(p => `"${p}"`).join(", ")}
7. ** ITEMIZED SYNTHESIS **: Mention EVERY component selected in Pass 1.
8. ** HARD SPECIFICS **: If the briefing mentions "Glasfaser-Trassen" or "Schwerlast-Logistik", IT MUST BE IN THE DESCRIPTION.
9. ** INDUSTRIAL AMBITION **: Describe it as a high-end technical solution. Avoid "schöne Website" or marketing fluff.
10. ** PAGES **: For "2. Individuelle Seiten", list the pages. ** ABSOLUTE RULE **: Do NOT add implementation details or technical notes in parentheses (e.g. NO "(Matrix-Struktur)", NO "(Timeline-Modul)"). Use clean titles like "Startseite, Über uns, Leistungen".
10. ** PAGES **: For "Individuelle Seiten", list the pages. ** ABSOLUTE RULE **: Do NOT add implementation details or technical notes in parentheses (e.g. NO "(Matrix-Struktur)", NO "(Timeline-Modul)"). Use clean titles like "Startseite, Über uns, Leistungen".
11. ** LOGIC **: Describe the ACTUAL logic (e.g., "Volltextsuche mit Auto-Complete", not "eine Suche").
12. ** KEYS **: Return EXACTLY the keys defined in "POSITION TITLES".
13. ** NO AGB **: NEVER mention "AGB" or "Geschäftsbedingungen".
@@ -591,7 +591,7 @@ ${JSON.stringify({ facts, details, strategy, ia }, null, 2)}
### OUTPUT FORMAT(Strict JSON):
{
"positionDescriptions": { "1. Das technische Fundament": string, ... }
"positionDescriptions": { "Das technische Fundament": string, ... }
}
`;
const p5Resp = await axios.post('https://openrouter.ai/api/v1/chat/completions', {