Files
jpremill 1feea40684 feat(ui): redesign voice cockpit with clinical companion drawer, Svelte 5 migration, and Gemini 3.8 voice
- Re-architect VoiceSession into full-bleed studio cockpit with overlay slide-over companion drawer
- Eliminate width squishing defect on LiveInsightPanel and add native dark/light theme support
- Integrate authentic Google Gemini 3.8 Flash TTS with Fenrir persona and fallback audio pipeline
- Implement comprehensive Playwright E2E visual regression suite across Desktop, iPad, and iPhone (21 tests, 45 snapshots)
- Migrate core application to Svelte 5 runes (, , ) with reactive stores
- Maintain .NET 8 Azure Functions serverless endpoints and clean build hygiene
2026-09-29 23:35:05 -04:00

4.0 KiB

name, description
name description
cbt-scenario-design Designs, calibrates, and validates Cognitive Behavioral Therapy (CBT) roleplay scenarios, difficulty ladders, character psychological profiles, and internal CBT logic rules.

CBT Scenario Design & Calibration Skill

Use this skill when creating new simulation scenarios, tuning AI character difficulty levels, adding cognitive distortion targets, or modifying the scenario catalog.


1. Clinical Scenario Architecture

Every scenario in Cognitive Clarity conforms to the following schema:

export interface Scenario {
  id: string;                                                // Unique kebab-case slug (e.g. 'workplace-critical-review')
  title: string;                                             // Human-readable evocative title
  description: string;                                       // Context setting the premise for the user
  category: 'Social Anxiety' | 'Workplace' | 'Relationships' | 'Self-Talk';
  difficulty: 'Beginner' | 'Intermediate' | 'Advanced';
  characterName: string;                                     // Name or archetype of the AI partner
  initialMessage: string;                                    // The opening dialogue from the AI character
  cbtFocus: string[];                                        // Target distortions and techniques
  systemInstruction: string;                                 // Comprehensive prompt with character persona & logic
}

2. Difficulty Calibration Rubric

Difficulty Character Resistance Cognitive Distortion Salience User Task Recommended Category
Beginner Highly receptive to assertive communication; explicitly hints at expectations. Overt, obvious distortions (e.g., explicit All-or-Nothing statements). Identify and dispute basic cognitive distortions; maintain calm presence. Social Anxiety, Self-Talk
Intermediate Ambiguous motivations; subtle passive-aggression; holds reasonable opposing perspective. Subtle, nuanced distortions (e.g., Mind Reading, Fortune Telling, Maladaptive Guilt). Set boundaries, de-escalate without defensiveness, practice Cognitive Reframing. Workplace, Relationships
Advanced Strong emotional activation; high clinical resistance; persistent invalidation or defensiveness. Layered cognitive distortions combined with emotional triggers. Apply Radical Acceptance, Gray Rock Method, multi-turn emotional regulation under stress. Relationships, Self-Talk

3. System Instruction Design Blueprint

When writing systemInstruction for a scenario, always follow this four-part structure:

1. CHARACTER IDENTITY & CONTEXT:
   - Name, relationship to user, current emotional state, and immediate goal.
   - Tone markers (e.g., "curt, hurried, stressed" or "skeptical, passive-aggressive").

2. INTERNAL CBT LOGIC:
   - IF the user becomes defensive or aggressive -> Escalate emotional distance or defensiveness.
   - IF the user validates emotions while establishing clear boundaries -> De-escalate and show grudging respect.
   - IF the user asks clarifying questions without mind reading -> Clarify directly and remove ambiguity.

3. VOCAL & DIALOGUE STYLE:
   - Sentence length: Short and conversational (1-3 sentences per turn).
   - Natural conversational elements: Hesitations, pauses, tone inflections.

4. ANTI-META GUARDRAILS:
   - NEVER break character.
   - NEVER provide feedback, scores, advice, or therapy tips.
   - NEVER say "Good job" or "That was a great reframing".

4. Scenario Validation Checklist

  • id is unique and formatted as lowercase kebab-case.
  • category is one of the four clinical categories.
  • difficulty is properly calibrated (Beginner, Intermediate, Advanced).
  • cbtFocus lists at least 2 valid entries from CBT_GLOSSARY.
  • initialMessage immediately immerses the user without preamble.
  • systemInstruction contains explicit INTERNAL CBT LOGIC rules.
  • Zero clinical meta-feedback or congratulatory phrases in persona instructions.