Back to .md Directory

Bugs & Issues

Tracks one fixed critical bug with root cause, solution, and code changes, plus a template for reporting new issues.

May 2, 2026
0 downloads
2 views
ai prompt
View source

What this file does

Tracks one fixed critical bug with root cause, solution, and code changes, plus a template for reporting new issues.

When to use it

  • You maintain a bug log and want a structured format with severity levels
  • You need to document a complex bug fix with code snippets and file references
  • You want a template for team members to report bugs consistently
  • You track historical fixes for reference and verification

Assumes this stack

TypeScriptAI/ConversationOrchestrator

Bugs & Issues

This document tracks known bugs, defects, and issues in the VENDRA application.

Bug Status Legend

  • ๐Ÿ”ด Critical - Blocks core functionality, needs immediate attention
  • ๐ŸŸก High - Significant impact on user experience
  • ๐ŸŸข Medium - Noticeable issue but has workarounds
  • ๐Ÿ”ต Low - Minor issue, cosmetic or edge case
  • โœ… Fixed - Issue resolved
  • ๐Ÿšง In Progress - Currently being worked on
  • โฌš Open - Identified but not yet assigned

Open Bugs

No bugs currently tracked.


Fixed Bugs

[BUG-001] Persona has unauthorized product knowledge in cold call scenarios

Status: โœ… Severity: Critical (Fixed) Component: AI/ConversationOrchestrator Reported: 2025-12-05 Fixed: 2025-12-05

Description: During cold call simulations, the generated persona already had knowledge about the product being sold, even though this information was never provided to them. This broke the realism of cold call scenarios where the client should have no prior knowledge of the seller or product.

Steps to Reproduce:

  1. Create a new session with call type "cold_call"
  2. Configure a scenario with product information
  3. Start the conversation without providing product details to the persona
  4. Observe that the AI persona responds as if they already know about the product

Expected Behavior: In cold call scenarios, the persona should have zero knowledge about the seller's company or product unless explicitly told during the conversation.

Actual Behavior: The persona demonstrated knowledge of the product without being informed, breaking the simulation's authenticity.

Root Cause: The buildSystemPrompt() function in src/lib/conversation-orchestrator.ts was always revealing full product information to the client persona regardless of contact type:

## El vendedor te ofrece:
- Producto: ${scenario.productName}
- Descripciรณn: ${scenario.description}
- Precio/condiciones: ${scenario.priceDetails}

This information was exposed to ALL contact types, including cold_call where the client shouldn't know anything.

Impact:

  • Broke training effectiveness for cold call practice
  • Salespeople couldn't practice proper product introduction techniques
  • Undermined the core value proposition of realistic scenario training

Solution: Implemented conditional context injection based on contactType in conversation-orchestrator.ts:

  1. Added determineColdCallKnowledge() function: Determines product knowledge level based on persona personality traits

    • Curious/open personas: Complete desconocimiento
    • Escรฉptico/analรญtico personas: Conocimiento de categorรญa + resistencia
    • Default: Conocimiento bรกsico de categorรญa
  2. Modified buildSystemPrompt(): Different product knowledge contexts by contact type

    • cold_call: Uses determineColdCallKnowledge() - NO specific product info
    • follow_up: Mentions previous conversation and product name
    • inbound_callback: Client already showed interest
  3. Updated buildMockClientReply(): Mock responses now respect contact type

  4. Added generatePreviousContext(): Generates simulated conversation history for follow_up/inbound_callback scenarios

Files Modified:

  • src/lib/conversation-orchestrator.ts:135-254 (buildSystemPrompt)
  • src/lib/conversation-orchestrator.ts:69-98 (buildMockClientReply)
  • src/lib/conversation-orchestrator.ts:135-207 (generatePreviousContext)
  • src/lib/conversation-orchestrator.ts:444-503 (orchestrateConversation)
  • src/lib/persona-engine.ts:35-79 (prompt improvements)

Verification:

  • TypeScript compilation: โœ… No errors
  • Build: โœ… Successful
  • Expected behavior: Cold call personas now respond with appropriate level of ignorance about the product

Bug Report Template

When adding a new bug, use this format:

### [BUG-XXX] Short Description

**Status:** ๐Ÿ”ด/๐ŸŸก/๐ŸŸข/๐Ÿ”ต | โฌš/๐Ÿšง/โœ…
**Severity:** Critical/High/Medium/Low
**Component:** API/Frontend/Database/AI/Auth/Other
**Reported:** YYYY-MM-DD
**Fixed:** YYYY-MM-DD (if applicable)

**Description:**
Clear description of the bug and its impact.

**Steps to Reproduce:**
1. Step one
2. Step two
3. Expected vs actual behavior

**Environment:**
- Browser/Node version
- AI Provider (if relevant)
- Other relevant details

**Workaround:**
If any temporary workaround exists.

**Solution:**
(Fill in when fixed) Description of the fix implemented.

Notes

  • Update this file immediately when bugs are discovered
  • Change status markers as work progresses: โฌš โ†’ ๐Ÿšง โ†’ โœ…
  • Keep fixed bugs in the "Fixed Bugs" section for historical reference
  • Cross-reference bug fixes in git commit messages (e.g., "fixes BUG-001")

What's inside

1 bug entry with 7 severity icons, 1 report template, 4 status markers, 3 notes

Change this for your project

  • Replace src/lib/conversation-orchestrator.ts with your own file paths
  • Replace src/lib/persona-engine.ts with your own file paths
  • Replace [BUG-001] numbering scheme with your own bug ID format

Where it goes

Use as the system prompt for your model call, or as the base instructions in your agent framework.

Worth borrowing

  • Linking each bug to specific code snippets and file line numbers for traceability
  • Using a status legend with emoji icons for quick visual scanning
  • Including a verification step (compilation, build, expected behavior) after the fix

Related Documents