commit 3751ab047b9b2e6b2ec55b2e3c65f69a3516990b (HEAD -> ModularPrompt, origin/ModularPrompt) Author: StillHammer Date: Sun Oct 12 14:51:01 2025 +0800 feat(keywords): Add hierarchical context to missing keywords prompt and fix LLM response format This commit improves keyword generation by providing hierarchical context for each element and fixing the LLM response format parsing. Changes: 1. lib/MissingKeywords.js: - Add buildHierarchicalContext() to generate compact contextual info for each element - Display hierarchy in prompt (e.g., "H2 existants: 'Titre1', 'Titre2'") - For Txt elements: show associated MC keyword + parent title - For FAQ elements: count existing FAQs - Fix LLM response format by providing 3 concrete examples from actual list - Add explicit warning to use exact tag names [Titre_H2_3], [Txt_H2_6] - Improve getElementContext() to better retrieve hierarchical elements 2. lib/selective-enhancement/SelectiveUtils.js: - Fix createTypedPrompt() to use specific keyword from resolvedContent - Remove fallback to csvData.mc0 (log error if no specific keyword) 3. lib/pipeline/PipelineExecutor.js: - Integrate generateMissingSheetVariables() as "Étape 0" before extraction Prompt format now: 1. [Titre_H2_3] (titre) — H2 existants: "Titre1", "Titre2" 2. [Txt_H2_6] (texte) — MC: "Plaque dibond" | Parent: "Guide dibond" 3. [Faq_q_1] (question) — 3 FAQ existantes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude lib/MissingKeywords.js lib/pipeline/PipelineExecutor.js