Conversational Ui
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Conversational UIs provide natural language interfaces for AI-powered applications, enabling users to interact through chat, voice, and multi-modal communication. They combine natural language understanding, context management, and intuitive design to deliver seamless, human-like interactions.
Why This Matters
- Reduces Friction: Natural, intuitive interfaces lower barriers to entry and reduce user effort
- Increases Engagement: Multi-modal interactions (text, voice, visual) enhance user experience and satisfaction
- Improves Accessibility: Voice and chat interfaces make applications accessible to users with disabilities
- Supports Scalability: Automated interactions handle increasing user volume without proportional support costs
- Provides Consistent Experience: Standardized responses ensure uniform quality across all interactions
- Enables Personalization: Context-aware conversations adapt to user preferences and history
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- User messages (text, voice transcripts)
- Voice input (audio stream)
- Image uploads (files)
- User interactions (clicks, selections)
- Entry Conditions:
- Browser supports Web Speech API (for voice features)
- React/Next.js application initialized
- Backend chat API endpoint available
- CSS framework configured (Tailwind CSS, etc.)
- Outputs:
- Chat interface UI components
- Voice recognition transcripts
- Text-to-speech output
- User interaction events
- Artifacts Required (Deliverables):
- Chat interface components
- Voice recognition components
- Text-to-speech components
- Multi-modal components
- Accessibility implementations
- Acceptance Evidence:
- Component tests passing
- Accessibility audit results (WCAG 2.1 AA)
- Cross-browser testing results
- Mobile responsiveness verified
- Success Criteria:
- All interactive elements keyboard accessible
- Screen reader announcements working
- Voice recognition accuracy > 80%
- Mobile responsive on all breakpoints
- Lighthouse accessibility score > 90
Skill Composition
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: conversational-ui3description: Conversational UIs provide natural language interfaces for AI-powered Use when this capability is needed.4---56# Conversational Ui78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17Conversational UIs provide natural language interfaces for AI-powered applications, enabling users to interact through chat, voice, and multi-modal communication. They combine natural language understanding, context management, and intuitive design to deliver seamless, human-like interactions.1819## Why This Matters20- **Reduces Friction**: Natural, intuitive interfaces lower barriers to entry and reduce user effort21- **Increases Engagement**: Multi-modal interactions (text, voice, visual) enhance user experience and satisfaction22- **Improves Accessibility**: Voice and chat interfaces make applications accessible to users with disabilities23- **Supports Scalability**: Automated interactions handle increasing user volume without proportional support costs24- **Provides Consistent Experience**: Standardized responses ensure uniform quality across all interactions25- **Enables Personalization**: Context-aware conversations adapt to user preferences and history2627---2829## Core Concepts & Rules3031### 1. Core Principles32- Follow established patterns and conventions33- Maintain consistency across codebase34- Document decisions and trade-offs3536### 2. Implementation Guidelines37- Start with the simplest viable solution38- Iterate based on feedback and requirements39- Test thoroughly before deployment404142## Inputs / Outputs / Contracts43* **Inputs**:44 - User messages (text, voice transcripts)45 - Voice input (audio stream)46 - Image uploads (files)47 - User interactions (clicks, selections)48* **Entry Conditions**:49 - Browser supports Web Speech API (for voice features)50 - React/Next.js application initialized51 - Backend chat API endpoint available52 - CSS framework configured (Tailwind CSS, etc.)53* **Outputs**:54 - Chat interface UI components55 - Voice recognition transcripts56 - Text-to-speech output57 - User interaction events58* **Artifacts Required (Deliverables)**:59 - Chat interface components60 - Voice recognition components61 - Text-to-speech components62 - Multi-modal components63 - Accessibility implementations64* **Acceptance Evidence**:65 - Component tests passing66 - Accessibility audit results (WCAG 2.1 AA)67 - Cross-browser testing results68 - Mobile responsiveness verified69* **Success Criteria**:70 - All interactive elements keyboard accessible71 - Screen reader announcements working72 - Voice recognition accuracy > 80%73 - Mobile responsive on all breakpoints74 - Lighthouse accessibility score > 907576## Skill Composition77* **Depends on**: [chatbot-integration](./chatbot-integration/SKILL.md), [llm-integration](../06-ai-ml-production/llm-integration/SKILL.md)78* **Compatible with**: [ai-agents](./ai-agents/SKILL.md), [ai-search](./ai-search/SKILL.md), [line-platform-integration](./line-platform-integration/SKILL.md)79* **Conflicts with**: Simple form-based UIs (different interaction model)80* **Related Skills**: [accessibility](../22-ux-ui-design/accessibility/SKILL.md), [responsive-design](../22-ux-ui-design/responsive-design/SKILL.md), [thai-ux-patterns](../22-ux-ui-design/thai-ux-patterns/SKILL.md)8182---8384## Quick Start / Implementation Example85861. Review requirements and constraints872. Set up development environment883. Implement core functionality following patterns894. Write tests for critical paths905. Run tests and fix issues916. Document any deviations or decisions9293```python94# Example implementation following best practices95def example_function():96 # Your implementation here97 pass98```99100101## Assumptions / Constraints / Non-goals102103* **Assumptions**:104 - Development environment is properly configured105 - Required dependencies are available106 - Team has basic understanding of domain107* **Constraints**:108 - Must follow existing codebase conventions109 - Time and resource limitations110 - Compatibility requirements111* **Non-goals**:112 - This skill does not cover edge cases outside scope113 - Not a replacement for formal training114115116## Compatibility & Prerequisites117118* **Supported Versions**:119 - Python 3.8+120 - Node.js 16+121 - Modern browsers (Chrome, Firefox, Safari, Edge)122* **Required AI Tools**:123 - Code editor (VS Code recommended)124 - Testing framework appropriate for language125 - Version control (Git)126* **Dependencies**:127 - Language-specific package manager128 - Build tools129 - Testing libraries130* **Environment Setup**:131 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)132133134## Test Scenario Matrix (QA Strategy)135136| Type | Focus Area | Required Scenarios / Mocks |137| :--- | :--- | :--- |138| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |139| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |140| **E2E** | User Journey | Critical user flows to test |141| **Performance** | Latency / Load | Benchmark requirements |142| **Security** | Vuln / Auth | SAST/DAST or dependency audit |143| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |144145146## Technical Guardrails & Security Threat Model147148### 1. Security & Privacy (Threat Model)149* **Top Threats**: Injection attacks, authentication bypass, data exposure150- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII151- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager152- [ ] **Authorization**: Validate user permissions before state changes153154### 2. Performance & Resources155- [ ] **Execution Efficiency**: Consider time complexity for algorithms156- [ ] **Memory Management**: Use streams/pagination for large data157- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks158159### 3. Architecture & Scalability160- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection161- [ ] **Modularity**: Decouple logic from UI/Frameworks162163### 4. Observability & Reliability164- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`165- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`166- [ ] **Error Handling**: Standardized error codes, no bare except167- [ ] **Observability Artifacts**:168 - **Log Fields**: timestamp, level, message, request_id169 - **Metrics**: request_count, error_count, response_time170 - **Dashboards/Alerts**: High Error Rate > 5%171172173## Agent Directives & Error Recovery174*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*175176- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.177- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.178- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.179- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.180181182## Definition of Done (DoD) Checklist183184- [ ] Tests passed + coverage met185- [ ] Lint/Typecheck passed186- [ ] Logging/Metrics/Trace implemented187- [ ] Security checks passed188- [ ] Documentation/Changelog updated189- [ ] Accessibility/Performance requirements met (if frontend)190191192## Anti-patterns / Pitfalls193194* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries195* ⚠️ **Watch out for**: Common symptoms and quick fixes196* 💡 **Instead**: Use proper error handling, pagination, and logging197198199## Reference Links & Examples200201* Internal documentation and examples202* Official documentation and best practices203* Community resources and discussions204205206## Versioning & Changelog207208* **Version**: 1.0.0209* **Changelog**:210 - 2026-02-22: Initial version with complete template structure211212---213> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.214<!-- tomevault:4.0:skill_md:2026-04-13 -->