Commit Graph

2 Commits

Author SHA1 Message Date
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
471058f731 Add flexible pipeline system with per-module LLM configuration
- New modular pipeline architecture allowing custom workflow combinations
- Per-step LLM provider configuration (Claude, OpenAI, Gemini, Deepseek, Moonshot, Mistral)
- Visual pipeline builder and runner interfaces with drag-and-drop
- 10 predefined pipeline templates (minimal-test to originality-bypass)
- Pipeline CRUD operations via ConfigManager and REST API
- Fix variable resolution in instructions (HTML tags were breaking {{variables}})
- Fix hardcoded LLM providers in AdversarialCore
- Add TESTS_LLM_PROVIDER.md documentation with validation results
- Update dashboard to disable legacy config editor

API Endpoints:
- POST /api/pipeline/save, execute, validate, estimate
- GET /api/pipeline/list, modules, templates

Backward compatible with legacy modular workflow system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 14:01:52 +08:00