20aed903ba
- 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>
1.7 KiB
1.7 KiB
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
- Valider les templates de prompts contre le scénario actif.
- run: python3 tools/scenario/validate_scenario.py game/scenarios/zacus_v2.yaml
- Lancer la suite de tests anti-triche.
- run: python3 tools/ai/hint_adversarial_test.py --no-leak-tolerance
- Évaluer la pertinence des indices sur le jeu de test.
- run: python3 tools/ai/hint_relevance_eval.py --samples 50 --threshold 0.90