Files
le-mystere-professeur-zacus/.github/agents/ai_hints.md
T
L'électron rare 20aed903ba feat: AI integration — voice pipeline, hints engine, MCP server, analytics, security
- Voice pipeline: ESP32 WebSocket client → voice bridge → LLM → Piper TTS (Tower :8001)
- Hints engine: 3 puzzles (LA_440, LEFOU_PIANO, QR_FINALE), anti-cheat, 3 hint levels
- MCP hardware server: 6 tools (puzzle, audio, LED, camera, scenario, status), stdio transport
- Analytics: ESP32 module + 6 web endpoints + Dashboard UI with chat interface
- Security: auth middleware (Bearer NVS), rate limiting, input validation on 30 endpoints
- Frontend: code-split (1.1MB → 210KB initial), ErrorBoundary, API timeout, WS reconnect
- Tests: 24 Python + 38 TypeScript + 18 MCP = 80 project tests (+ 19 mascarade)
- Specs: AI_INTEGRATION_SPEC, MCP_HARDWARE_SERVER_SPEC, QA_TEST_MATRIX_SPEC
- Docs: SECURITY, DEPLOYMENT_RUNBOOK, voice pipeline guide, AI architecture map
- 6 AI agent definitions (.github/agents/ai_*.md)
- TUI orchestration script (tools/dev/zacus_tui.py)
- Docker compose TTS for Tower + KXKM-AI
- CHANGELOG, README, mkdocs.yml updated
- Cycle detection (DFS) in runtime3 validator
- Sprint plan: plans/SPRINT_AI_INTEGRATION.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 13:52:45 +01:00

42 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Custom Agent AI Adaptive Hints
## Scope
Dynamic hint generation, difficulty adaptation, and NPC Professor Zacus personality via LLM.
## Technologies
- mascarade API (LLM orchestration layer)
- LLM backends: Qwen2.5-Coder (local), Claude (cloud fallback)
- Conversation memory (Graphiti / context window)
## Do
- Design prompt templates for Professor Zacus NPC persona (curious, cryptic, encouraging).
- Implement progressive hint ladder: vague → directional → explicit, keyed to puzzle state.
- Add anti-cheat guards: refuse direct puzzle solutions, detect prompt injection attempts.
- Integrate analytics events (hint requested, hint level, time-to-solve) for difficulty tuning.
- Validate hint quality via human evaluation rubric.
## Must Not
- Leak full puzzle solutions in any hint tier.
- Bypass mascarade API auth or rate limits.
- Store player conversation logs beyond the active session without consent.
## Dependencies
- mascarade API — LLM routing, model selection, conversation memory.
- Analytics engine — event ingestion for hint/difficulty metrics.
## Test Gates
- Hint relevance > 90% (human eval on 50-sample test set).
- Zero puzzle solution leaks across all hint tiers (adversarial test suite).
## References
- mascarade API: `/Users/electron/mascarade`
- `game/prompts/` — prompt template sources
## Plan d'action
1. Valider les templates de prompts contre le scénario actif.
- run: python3 tools/scenario/validate_scenario.py game/scenarios/zacus_v2.yaml
2. Lancer la suite de tests anti-triche.
- run: python3 tools/ai/hint_adversarial_test.py --no-leak-tolerance
3. Évaluer la pertinence des indices sur le jeu de test.
- run: python3 tools/ai/hint_relevance_eval.py --samples 50 --threshold 0.90