Bugs & Issues
Tracks one fixed critical bug with root cause, solution, and code changes, plus a template for reporting new issues.
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
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:
- Create a new session with call type "cold_call"
- Configure a scenario with product information
- Start the conversation without providing product details to the persona
- 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:
-
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
-
Modified
buildSystemPrompt(): Different product knowledge contexts by contact typecold_call: UsesdetermineColdCallKnowledge()- NO specific product infofollow_up: Mentions previous conversation and product nameinbound_callback: Client already showed interest
-
Updated
buildMockClientReply(): Mock responses now respect contact type -
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.tswith your own file paths - Replace
src/lib/persona-engine.tswith 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
Character Persona
Defines a Fallout 2 roleplay persona for an LLM agent: charming rogue with social-first combat and moral code.
How to implement tool use
Explains how to define, configure, and control tool use with the Anthropic API, including model selection, tool definitions, output control, and parallel calls.
Gemini by Example
Collects 20+ Gemini API code examples covering text, images, audio, video, PDFs, agents, and token counting.
Claude Tool Use (Function Calling) Documentation
Teaches how to define and use Claude tool use (function calling) with Python, including schema rules, execution patterns, and best practices.