Go to file
StillHammer 3751ab047b 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 <noreply@anthropic.com>
2025-10-12 14:51:01 +08:00
.github/workflows Setup test system extended 2025-09-05 20:09:53 +08:00
lib feat(keywords): Add hierarchical context to missing keywords prompt and fix LLM response format 2025-10-12 14:51:01 +08:00
public Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
reports Fix BatchProcessor initialization and add comprehensive test suite 2025-09-19 14:17:49 +08:00
tests Add modular pipeline demo system with real module integration 2025-09-23 16:03:20 +08:00
tools Fix BatchProcessor initialization and add comprehensive test suite 2025-09-19 14:17:49 +08:00
.env.example update test system and logger 2025-09-08 12:33:16 +08:00
.gitignore Add logviewer.html, prompt improvment, clean duplication 2025-09-04 09:27:07 +08:00
API.md Complete API system implementation with comprehensive testing 2025-09-16 11:10:46 +08:00
ARCHITECTURE_REFACTOR.md Module system code base 2025-09-04 21:24:45 +08:00
claude_save.md Improve step by step system, fix modular level 3 and 4 modules 2025-09-11 15:31:53 +08:00
CLAUDE.md Update and compact CLAUDE.md documentation 2025-10-09 16:11:04 +08:00
fdsm Module system code base 2025-09-04 21:24:45 +08:00
GOOGLE_SHEET_VERSIONING_SPEC.md [200~add step-by-step versioning system with Google Sheets integration 2025-09-06 16:38:20 +08:00
package-lock.json Fix critical authentication and Digital Ocean integration issues 2025-09-15 23:06:07 +08:00
package.json Fix BatchProcessor initialization and add comprehensive test suite 2025-09-19 14:17:49 +08:00
plan_implem_initialGen.md docs: Add implementation plan for InitialGeneration reintegration 2025-10-12 08:23:33 +08:00
plan.md Module system code base 2025-09-04 21:24:45 +08:00
RAPPORT_ETAT_SYSTEME_GLOBAL.md [200~add step-by-step versioning system with Google Sheets integration 2025-09-06 16:38:20 +08:00
SELECTIVE_ENHANCEMENT_GUIDE.md feat(selective): Add detailed logging and comprehensive guide 2025-10-12 11:37:15 +08:00
server.js Setup test system extended 2025-09-05 20:09:53 +08:00
simple-server.js Add modular pipeline demo system with real module integration 2025-09-23 16:03:20 +08:00
test-llm-execution.cjs Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
TESTS_LLM_PROVIDER.md Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
TODO.md Initial commit 2025-09-03 15:29:19 +08:00
TODOLIST.md Fix BatchProcessor initialization and add comprehensive test suite 2025-09-19 14:17:49 +08:00