feat(P01-05-01,P01-05-02,P01-05-03): coaching debrief + guardrail filter + TTS voice
server/debrief.py — generate_debrief() loads the session turns + branch outcome + scenario debrief.debrief_focus, calls deepseek-v4-flash:cloud in no_think mode (D-020, REQ-LLM-02) with the debrief prompt template (docs/debrief/default.yaml), produces a concise 3-bullet text summary (what you did well / what to improve / one next step) referencing the learner's actual turns + branch outcome. TASK-05-02: the debrief text is routed through the CustomerServiceGuardrail output filter (debrief role) — legal-action recommendations are blocked and replaced with a coaching redirect. TASK-05-03: the debrief is synthesized via the same TTSProvider interface as the role-play (D-006 one voice) — no separate TTS path (verified by structural test). 5 tests pass (debrief references turns + branch, no_think mode asserted, guardrail blocks 'tell the customer to sue', normal coaching passes, TTSProvider synthesis reuses role-play voice). ---ci--- phase: 1 milestone: v0.1 plan: 05 task: 05-01,05-02,05-03 status: execute persona: backend-engineer requirements: covered: [REQ-DEBRIEF-01, REQ-LLM-02, REQ-NFR-SAFE-01] ---/ci---
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Default debrief prompt template (TASK-05-01).
|
||||
# Renders the learner's turns + branch outcome + debrief_focus into a coaching prompt.
|
||||
# Uses deepseek-v4-flash:cloud no_think mode (D-020) for latency.
|
||||
|
||||
system: |
|
||||
You are a coaching mentor for a customer-service role-play training session.
|
||||
Produce a concise (3-bullet) debrief about the learner's performance.
|
||||
Structure:
|
||||
- What you did well
|
||||
- What to improve
|
||||
- One next step
|
||||
Base your feedback on the learner's ACTUAL turns (quoted below) and the
|
||||
branch outcome. Do NOT reason step-by-step; respond directly (no_think).
|
||||
Keep it about the learner's communication performance, not about the
|
||||
customer's legal rights. Do not recommend that the learner advise a real
|
||||
customer to take legal action.
|
||||
|
||||
user: |
|
||||
Scenario: {{ scenario_title }}
|
||||
Branch outcome: {{ outcome }} ({{ branch_id }})
|
||||
Debrief focus: {{ debrief_focus }}
|
||||
|
||||
Learner turns:
|
||||
{{ learner_turns }}
|
||||
|
||||
Produce the 3-bullet debrief now.
|
||||
Reference in New Issue
Block a user