diff --git a/ai-docs/templates/README.md b/ai-docs/templates/README.md
new file mode 100644
index 000000000..d14e2949e
--- /dev/null
+++ b/ai-docs/templates/README.md
@@ -0,0 +1,71 @@
+# AI Templates Directory
+
+## Purpose
+
+Templates for generating and maintaining contact center widgets and components.
+
+## Structure
+
+```
+templates/
+├── new-widget/ # Widget generation (7 modules)
+├── existing-widget/ # Bug fixes, features (2 modules)
+└── documentation/ # Documentation generation (2 modules, reusable for all packages)
+```
+
+## Templates
+
+### 1. New Widget Generation
+
+**Directory:** [new-widget/](./new-widget/)
+
+**Modules:**
+- [00-master.md](./new-widget/00-master.md) - Orchestrator & workflow
+- [01-pre-questions.md](./new-widget/01-pre-questions.md) - Requirements gathering
+- [02-code-generation.md](./new-widget/02-code-generation.md) - Widget code patterns
+- [03-component-generation.md](./new-widget/03-component-generation.md) - Presentational components (conditional)
+- [04-integration.md](./new-widget/04-integration.md) - cc-widgets + samples integration
+- [05-test-generation.md](./new-widget/05-test-generation.md) - Test patterns
+- [06-validation.md](./new-widget/06-validation.md) - Quality checklist
+
+### 2. Existing Widget Maintenance
+
+**Directory:** [existing-widget/](./existing-widget/)
+
+**Modules:**
+- [bug-fix.md](./existing-widget/bug-fix.md) - Bug fix workflow
+- [feature-enhancement.md](./existing-widget/feature-enhancement.md) - Feature addition workflow
+
+### 3. Documentation Generation
+
+**Directory:** [documentation/](./documentation/)
+
+**Reusable for:** Widgets, store, components, utilities
+
+**Modules:**
+- [create-agent-md.md](./documentation/create-agent-md.md) - Generate AGENTS.md
+- [create-architecture-md.md](./documentation/create-architecture-md.md) - Generate ARCHITECTURE.md
+
+---
+
+## Usage
+
+**New Widget:** Start with [new-widget/00-master.md](./new-widget/00-master.md)
+
+**Bug Fix:** Read [existing-widget/bug-fix.md](./existing-widget/bug-fix.md)
+
+**Feature Addition:** Read [existing-widget/feature-enhancement.md](./existing-widget/feature-enhancement.md)
+
+**Documentation Only:** Use [documentation/](./documentation/) templates
+
+## Pattern References
+
+- [TypeScript Patterns](../patterns/typescript-patterns.md)
+- [React Patterns](../patterns/react-patterns.md)
+- [MobX Patterns](../patterns/mobx-patterns.md)
+- [Web Component Patterns](../patterns/web-component-patterns.md)
+- [Testing Patterns](../patterns/testing-patterns.md)
+
+---
+
+_Last Updated: 2025-11-26_
diff --git a/ai-docs/templates/documentation/create-agent-md.md b/ai-docs/templates/documentation/create-agent-md.md
new file mode 100644
index 000000000..9eb8d6fd0
--- /dev/null
+++ b/ai-docs/templates/documentation/create-agent-md.md
@@ -0,0 +1,507 @@
+# Create AGENTS.md Template
+
+## Overview
+
+This template generates the `AGENTS.md` file for any package (widgets, store, components, utilities). It provides usage documentation optimized for LLM consumption.
+
+**Purpose:** User-facing documentation with examples and API reference
+
+**Token Optimized:** Architecture link at the END for token efficiency
+
+**Reusable For:** All packages in the monorepo
+
+---
+
+## When to Use
+
+- Creating new widget documentation
+- Creating new package documentation
+- Updating existing AGENTS.md
+- Adding missing examples
+
+---
+
+## Pre-Generation Questions
+
+### 1. Package Information
+
+- **Package name:** _______________
+ - Example: `@webex/cc-agent-directory`, `@webex/cc-store`
+- **Package type:** Widget | Store | Component Library | Utility
+- **Display name:** _______________
+ - Example: "Agent Directory", "CC Store", "CC Components"
+
+### 2. Purpose & Capabilities
+
+- **Primary purpose (one sentence):** _______________
+- **Key capabilities (3-5 bullet points):** _______________
+- **Problem it solves:** _______________
+
+### 3. Usage Examples Needed
+
+- **How many examples to include:** 4-6 (recommended)
+- **Example scenarios:** _______________
+ - Basic usage (always include)
+ - Common use cases
+ - Integration patterns
+ - Error handling
+
+### 4. API Surface
+
+- **Props/Parameters:** List all public props/parameters
+- **Callbacks/Events:** List all callbacks/events
+- **Methods (if applicable):** List all public methods
+
+---
+
+## AGENTS.md Structure
+
+```markdown
+# {Display Name}
+
+## Overview
+
+{Brief description of the package - 2-3 sentences}
+
+**Package:** `{package-name}`
+
+**Version:** See [package.json](../package.json)
+
+---
+
+## Why and What is This Used For?
+
+### Purpose
+
+{Explain the purpose and problem it solves - 3-4 sentences}
+
+### Key Capabilities
+
+- **Capability 1** - Brief description
+- **Capability 2** - Brief description
+- **Capability 3** - Brief description
+- **Capability 4** - Brief description
+- **Capability 5** - Brief description
+
+---
+
+## Examples and Use Cases
+
+### Getting Started
+
+#### Basic Usage (React)
+
+```typescript
+import { {PackageName} } from '{package-name}';
+
+function MyApp() {
+ const handleEvent = (data) => {
+ console.log('Event:', data);
+ };
+
+ return (
+ <{PackageName}
+ requiredProp="value"
+ onEvent={handleEvent}
+ />
+ );
+}
+```
+
+#### Web Component Usage (If Applicable)
+
+```html
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+### Common Use Cases
+
+#### 1. {Use Case Title}
+
+{Brief description of the use case}
+
+```typescript
+import { {PackageName} } from '{package-name}';
+
+// Code example demonstrating this use case
+// Include comments explaining key parts
+```
+
+**Key Points:**
+- Point about this use case
+- Another important note
+- When to use this pattern
+
+#### 2. {Use Case Title}
+
+{Brief description of the use case}
+
+```typescript
+// Code example
+```
+
+**Key Points:**
+- Point about this use case
+- Another important note
+
+#### 3. {Use Case Title}
+
+{Continue with 4-6 realistic examples total}
+
+### Integration Patterns (Optional)
+
+#### Pattern 1: {Pattern Name}
+
+```typescript
+// Integration pattern example
+```
+
+#### Pattern 2: {Pattern Name}
+
+```typescript
+// Integration pattern example
+```
+
+---
+
+## Dependencies
+
+**Note:** For exact versions, see [package.json](../package.json)
+
+### Runtime Dependencies
+
+| Package | Purpose |
+|---------|---------|
+| `{dependency-1}` | Purpose description |
+| `{dependency-2}` | Purpose description |
+| `{dependency-3}` | Purpose description |
+
+### Peer Dependencies
+
+| Package | Purpose |
+|---------|---------|
+| `{peer-dep-1}` | Purpose description |
+| `{peer-dep-2}` | Purpose description |
+
+### Development Dependencies
+
+Key development tools (see [package.json](../package.json) for versions):
+- TypeScript
+- Jest (testing)
+- Webpack (bundling)
+- ESLint (linting)
+
+---
+
+## API Reference
+
+{Choose the appropriate section based on package type}
+
+### For Widgets: Props API
+
+| Prop | Type | Required | Default | Description |
+|------|------|----------|---------|-------------|
+| `requiredProp` | `string` | Yes | - | Description of what this prop does |
+| `optionalProp` | `number` | No | `10` | Description with default value |
+| `onEvent` | `(data: Type) => void` | No | - | Callback description |
+| `onError` | `(error: Error) => void` | No | - | Error callback |
+
+### For Store: Methods API
+
+| Method | Parameters | Returns | Description |
+|--------|------------|---------|-------------|
+| `init()` | `config: Config` | `Promise` | Initializes the store |
+| `getItems()` | `params?: Params` | `Promise- ` | Fetches items |
+| `setItem()` | `item: Item` | `void` | Sets an item |
+
+### For Components: Exported Components
+
+| Component | Purpose | Props Interface |
+|-----------|---------|-----------------|
+| `Component1` | Purpose | `Component1Props` |
+| `Component2` | Purpose | `Component2Props` |
+| `Component3` | Purpose | `Component3Props` |
+
+### For Utilities: Functions API
+
+| Function | Parameters | Returns | Description |
+|----------|------------|---------|-------------|
+| `utilityFn1()` | `param: Type` | `ReturnType` | What it does |
+| `utilityFn2()` | `param: Type` | `ReturnType` | What it does |
+
+---
+
+## Installation
+
+```bash
+yarn add {package-name}
+```
+
+{If peer dependencies required, add:}
+
+### Peer Dependencies Required
+
+```bash
+yarn add @momentum-ui/react-collaboration react react-dom
+```
+
+---
+
+## Additional Resources
+
+For detailed {architecture/implementation/technical details}, see [ARCHITECTURE.md](./ARCHITECTURE.md).
+
+---
+
+_Last Updated: {YYYY-MM-DD}_
+```
+
+---
+
+## Content Guidelines
+
+### Overview Section
+
+**Do:**
+- Keep it brief (2-3 sentences)
+- Mention package name clearly
+- Reference package.json for version
+- Explain at high level what it is
+
+**Don't:**
+- Go into technical details (save for ARCHITECTURE.md)
+- Include code examples yet
+- Hardcode version numbers
+
+---
+
+### Purpose Section
+
+**Do:**
+- Explain why this package exists
+- Describe the problem it solves
+- List 3-5 key capabilities
+- Be clear and concise
+
+**Don't:**
+- Duplicate overview content
+- Go into implementation details
+- Use jargon without explanation
+
+---
+
+### Examples Section
+
+**Do:**
+- Start with simplest example
+- Include 4-6 realistic use cases
+- Add comments explaining key parts
+- Show both success and error handling
+- Include Web Component example if applicable
+
+**Don't:**
+- Show overly complex examples first
+- Skip error handling
+- Use unrealistic scenarios
+- Include incomplete code
+
+**Example Structure:**
+1. Basic usage (required)
+2. Common use case 1
+3. Common use case 2
+4. Error handling
+5. Advanced pattern
+6. Integration pattern
+
+---
+
+### Dependencies Section
+
+**Do:**
+- Reference package.json for versions
+- Explain purpose of each dependency
+- Separate runtime, peer, and dev dependencies
+- Keep descriptions brief
+
+**Don't:**
+- Hardcode version numbers
+- List every dev dependency
+- Skip explaining purpose
+
+---
+
+### API Section
+
+**Do:**
+- Use table format for easy scanning
+- Include all required information
+- Mark required vs optional
+- Include default values
+- Link to type definitions
+
+**Don't:**
+- Skip descriptions
+- Forget to mark required fields
+- Use ambiguous type names
+- Skip examples for complex props
+
+---
+
+### Token Optimization
+
+**Key Strategy:**
+- **Architecture link goes at the END**
+- LLM reads AGENTS.md first for most queries
+- Only loads ARCHITECTURE.md when needed
+- Saves 500+ tokens for simple queries
+
+**Example Query Paths:**
+
+Query: "How do I use AgentDirectory?"
+- LLM reads: AGENTS.md only (~400 tokens)
+- Finds: Basic usage example
+- Returns: Answer without needing ARCHITECTURE.md
+
+Query: "How does AgentDirectory integrate with the store?"
+- LLM reads: AGENTS.md (~400 tokens)
+- Sees: Link to ARCHITECTURE.md at end
+- Reads: ARCHITECTURE.md (~500 tokens)
+- Returns: Detailed architecture answer
+
+---
+
+## Validation Checklist
+
+Before considering AGENTS.md complete:
+
+### Content Completeness
+- [ ] Overview section complete
+- [ ] Purpose clearly explained
+- [ ] 3-5 key capabilities listed
+- [ ] 4-6 usage examples provided
+- [ ] Dependencies documented
+- [ ] API reference complete
+- [ ] Installation instructions included
+
+### Quality Checks
+- [ ] All code examples work
+- [ ] No hardcoded versions (references package.json)
+- [ ] Examples have comments
+- [ ] Error handling shown
+- [ ] Props/methods fully documented
+- [ ] Link to ARCHITECTURE.md at END
+
+### Formatting
+- [ ] Markdown renders correctly
+- [ ] Code blocks have language tags
+- [ ] Tables format properly
+- [ ] No broken links
+- [ ] Consistent heading levels
+
+---
+
+## Examples by Package Type
+
+### Widget Package Example
+
+**Package:** `@webex/cc-agent-directory`
+
+**Key Sections:**
+- Props API table (all props documented)
+- Both React and Web Component examples
+- Common use cases: search, filter, select
+- Integration with store and SDK
+- Error handling patterns
+
+**Example Count:** 6
+1. Basic usage
+2. Search functionality
+3. Filter by availability
+4. Agent selection
+5. Error handling
+6. Custom styling
+
+---
+
+### Store Package Example
+
+**Package:** `@webex/cc-store`
+
+**Key Sections:**
+- Methods API table (all methods documented)
+- Initialization examples
+- Observable usage
+- Event subscription
+- Data fetching patterns
+
+**Example Count:** 5
+1. Basic initialization
+2. Reading observables
+3. Setting callbacks
+4. Fetching data
+5. Error handling
+
+---
+
+### Component Library Example
+
+**Package:** `@webex/cc-components`
+
+**Key Sections:**
+- Exported components table
+- Component usage examples
+- Props patterns
+- Styling approach
+- Integration with widgets
+
+**Example Count:** 4
+1. Basic component usage
+2. Composing components
+3. Custom styling
+4. Integration with widgets
+
+---
+
+### Utility Package Example
+
+**Package:** `@webex/cc-ui-logging`
+
+**Key Sections:**
+- Functions API table
+- HOC usage
+- Direct function calls
+- Integration patterns
+
+**Example Count:** 4
+1. Using withMetrics HOC
+2. Direct logMetrics call
+3. Custom metrics
+4. Integration with widgets
+
+---
+
+## Related Templates
+
+- **[create-architecture-md.md](./create-architecture-md.md)** - Technical architecture docs
+
+---
+
+_Template Version: 1.0.0_
+_Last Updated: 2025-11-26_
+
diff --git a/ai-docs/templates/documentation/create-architecture-md.md b/ai-docs/templates/documentation/create-architecture-md.md
new file mode 100644
index 000000000..de2af39f0
--- /dev/null
+++ b/ai-docs/templates/documentation/create-architecture-md.md
@@ -0,0 +1,683 @@
+# Create ARCHITECTURE.md Template
+
+## Overview
+
+This template generates the `ARCHITECTURE.md` file for any package. It provides technical documentation about implementation, data flows, and troubleshooting.
+
+**Purpose:** Technical deep-dive for developers and AI assistants
+
+**Required:** Mermaid diagrams (not PlantUML) for native rendering
+
+**Reusable For:** All packages in the monorepo
+
+---
+
+## When to Use
+
+- Creating new package documentation
+- Documenting complex architecture
+- Adding sequence diagrams
+- Creating troubleshooting guides
+- Updating after architectural changes
+
+---
+
+## Pre-Generation Questions
+
+### 1. Package Information
+
+- **Package name:** _______________
+- **Package type:** Widget | Store | Component Library | Utility
+- **Display name:** _______________
+
+### 2. Architecture Details
+
+- **Number of components/modules:** _______________
+- **Key files to document:** _______________
+- **Layer interactions:** Which layers does this package touch?
+- **External dependencies:** SDK, store, other packages?
+
+### 3. Diagrams Needed
+
+- **Layer communication diagram:** Yes / No
+- **Sequence diagrams:** How many scenarios? (recommend 3-5)
+- **Flow diagrams:** Any special flows to document?
+
+### 4. Troubleshooting
+
+- **Common issues:** List 5-8 common issues users face
+- **For each issue:**
+ - Symptoms
+ - Possible causes
+ - Solutions
+
+---
+
+## ARCHITECTURE.md Structure
+
+```markdown
+# {Display Name} - Architecture
+
+## Component Overview
+
+{Brief architectural overview - 2-3 sentences explaining the design}
+
+### Component Table
+
+| Component/Module | File | Purpose | Props/Params | State | Callbacks | Tests | Dependencies |
+|------------------|------|---------|--------------|-------|-----------|-------|--------------|
+| **Component1** | `src/file.tsx` | Purpose | PropType | Local state | onEvent | `tests/file.tsx` | Dependencies |
+| **Component2** | `src/file2.ts` | Purpose | ParamType | Returns X | N/A | `tests/file2.ts` | Dependencies |
+| **Component3** | `src/file3.tsx` | Purpose | PropType | N/A | onCallback | `tests/file3.tsx` | Dependencies |
+
+{Add rows for each major component/module in the package}
+
+---
+
+## SDK Integration (If Applicable)
+
+{Only include if package integrates with SDK}
+
+| Area | SDK Methods Used | SDK Events Subscribed | Package Methods |
+|------|------------------|----------------------|-----------------|
+| Initialization | `register()`, `LoggerProxy` | `agent:dnRegistered` | `init()`, `setup()` |
+| Operations | `someMethod()` | `event:name` | `handler()` |
+
+---
+
+## File Structure
+
+```
+{package-name}/
+├── src/
+│ ├── {main-component}/
+│ │ ├── index.tsx # Main component
+│ │ └── {name}.types.ts # Type definitions
+│ ├── helper.ts # Helper functions
+│ ├── utils.ts # Utilities
+│ ├── constants.ts # Constants
+│ ├── index.ts # Package exports
+│ └── wc.ts # Web Component export (if applicable)
+├── ai-docs/
+│ ├── AGENTS.md # Usage docs
+│ └── ARCHITECTURE.md # This file
+├── tests/
+│ ├── {main-component}/
+│ │ └── index.tsx # Component tests
+│ ├── helper.ts # Helper tests
+│ └── utils.ts # Utility tests
+├── package.json
+├── tsconfig.json
+├── webpack.config.js
+└── ... config files
+```
+
+---
+
+## Data Flows
+
+### Layer Communication Flow
+
+{Show how this package fits into the overall architecture}
+
+```mermaid
+graph TB
+ subgraph "Layer 1"
+ A[Component A]
+ B[Component B]
+ end
+
+ subgraph "Layer 2"
+ C[Module C]
+ D[Module D]
+ end
+
+ subgraph "Layer 3"
+ E[External System]
+ end
+
+ A -->|Action| C
+ B -->|Action| C
+ C -->|Calls| E
+ E -->|Response| C
+ C -->|Update| A
+ C -->|Update| B
+
+ style A fill:#e1f5ff
+ style C fill:#fff4e1
+ style E fill:#ffe1e1
+```
+
+### Hook/Module Details (If Applicable)
+
+{For widgets, explain hook logic. For utilities, explain key functions}
+
+**Key Responsibilities:**
+- Responsibility 1
+- Responsibility 2
+- Responsibility 3
+
+**Data Transformations:**
+- Input → Processing → Output
+
+---
+
+## Sequence Diagrams
+
+{Include 3-5 sequence diagrams for key scenarios}
+
+### Scenario 1: {Initialization/Setup/Main Flow}
+
+{Brief description of this scenario}
+
+```mermaid
+sequenceDiagram
+ participant A as Component A
+ participant B as Module B
+ participant C as External System
+ participant D as Store/State
+
+ A->>B: Action initiated
+ activate B
+
+ B->>D: Read state
+ D-->>B: Current state
+
+ B->>C: API call
+ C-->>B: Response
+
+ B->>D: Update state
+
+ B-->>A: Action complete
+ deactivate B
+
+ A->>A: Update UI
+```
+
+### Scenario 2: {User Interaction/Event Handling}
+
+{Brief description}
+
+```mermaid
+sequenceDiagram
+ participant User
+ participant Component
+ participant Hook
+ participant Store
+ participant SDK
+
+ User->>Component: Interaction
+ Component->>Hook: Handler called
+ activate Hook
+
+ Hook->>Store: Read data
+ Store-->>Hook: Data
+
+ Hook->>SDK: SDK method
+ SDK-->>Hook: Success/Error
+
+ alt Success
+ Hook->>Store: Update (runInAction)
+ Hook->>Component: Callback
+ else Error
+ Hook->>Component: Error callback
+ end
+
+ deactivate Hook
+ Component-->>User: UI updated
+```
+
+### Scenario 3: {Error Handling/Edge Case}
+
+{Brief description}
+
+```mermaid
+sequenceDiagram
+ participant Component
+ participant Module
+ participant External
+
+ Component->>Module: Request
+ activate Module
+
+ Module->>External: Call
+ External-->>Module: Error
+
+ Module->>Module: Handle error
+ Module->>Module: Log error
+ Module->>Module: Set error state
+
+ Module-->>Component: Error response
+ deactivate Module
+
+ Component->>Component: Display error UI
+```
+
+{Add 2-3 more scenarios as needed}
+
+---
+
+## Integration Architecture (If Applicable)
+
+{For widgets, show how they integrate with cc-widgets}
+{For components, show how they're used by widgets}
+{For utilities, show usage patterns}
+
+### Integration Pattern
+
+```mermaid
+graph LR
+ subgraph "Consumer"
+ A[Application]
+ end
+
+ subgraph "This Package"
+ B[Main Export]
+ C[Module 1]
+ D[Module 2]
+ end
+
+ subgraph "Dependencies"
+ E[Dependency 1]
+ F[Dependency 2]
+ end
+
+ A -->|Uses| B
+ B -->|Imports| C
+ B -->|Imports| D
+ C -->|Calls| E
+ D -->|Calls| F
+```
+
+---
+
+## Troubleshooting Guide
+
+### Common Issues
+
+{Include 5-8 common issues with detailed solutions}
+
+#### 1. {Issue Title}
+
+**Symptoms:**
+- Symptom 1
+- Symptom 2
+- What the user sees
+
+**Possible Causes:**
+- Cause 1 with explanation
+- Cause 2 with explanation
+- Cause 3 with explanation
+
+**Solutions:**
+
+```typescript
+// Solution 1: Check X
+import { Package } from '{package-name}';
+
+// Verify condition
+console.log('Check:', condition);
+
+// Fix approach
+const fixed = correctWay();
+```
+
+```typescript
+// Solution 2: Alternative approach
+// Step-by-step fix with code
+```
+
+**Prevention:**
+- How to avoid this issue in future
+- Best practices
+
+---
+
+#### 2. {Issue Title}
+
+**Symptoms:**
+- What happens
+
+**Possible Causes:**
+- Why this happens
+
+**Solutions:**
+
+```typescript
+// Code solution
+```
+
+---
+
+{Continue with 5-8 total issues}
+
+---
+
+## Performance Considerations (Optional)
+
+{Include if package has performance implications}
+
+### Optimization Strategies
+
+1. **Strategy 1**
+ - Description
+ - When to use
+ - Code example
+
+2. **Strategy 2**
+ - Description
+ - When to use
+ - Code example
+
+### Common Performance Issues
+
+- Issue and solution
+- Issue and solution
+
+---
+
+## Related Documentation
+
+- [Agent Documentation](./AGENTS.md) - Usage examples and API
+- [{Related Pattern}](../../../../ai-docs/patterns/{pattern}.md) - Pattern documentation
+- [{Related Package}](../../{package}/ai-docs/AGENTS.md) - Related package docs
+- [{Another Related}](../../{package}/ai-docs/ARCHITECTURE.md) - Related architecture
+
+---
+
+_Last Updated: {YYYY-MM-DD}_
+```
+
+---
+
+## Content Guidelines
+
+### Component Overview Section
+
+**Do:**
+- Provide architectural context
+- Explain design decisions
+- Use component table for structure
+- Include all major files
+
+**Don't:**
+- Duplicate AGENTS.md content
+- Skip test file locations
+- Forget dependencies column
+
+**Component Table Requirements:**
+- List all major components/modules
+- Include file paths
+- Document props/parameters
+- Note callbacks/events
+- Reference test locations
+- List key dependencies
+
+---
+
+### File Structure Section
+
+**Do:**
+- Show complete directory tree
+- Include all important files
+- Add comments explaining purpose
+- Match actual structure
+
+**Don't:**
+- Include build artifacts
+- Show node_modules
+- Skip configuration files
+
+---
+
+### Data Flows Section
+
+**Do:**
+- Use Mermaid diagrams (not PlantUML)
+- Show layer interactions
+- Include data direction arrows
+- Color-code by layer
+- Keep diagrams focused
+
+**Don't:**
+- Make diagrams too complex
+- Skip important connections
+- Use PlantUML syntax
+- Forget to label arrows
+
+**Mermaid Tips:**
+- `graph TB` for top-to-bottom flow
+- `graph LR` for left-to-right flow
+- `subgraph` for grouping
+- `style X fill:#color` for coloring
+- `-->` for arrows, `-->>` for returns
+
+---
+
+### Sequence Diagrams Section
+
+**Do:**
+- Show 3-5 key scenarios
+- Include initialization flow
+- Show error handling
+- Document edge cases
+- Use clear participant names
+- Add activation boxes
+- Use alt/else for conditionals
+
+**Don't:**
+- Show every possible flow
+- Make diagrams too detailed
+- Skip error scenarios
+- Use ambiguous names
+
+**Mermaid Sequence Tips:**
+- `participant A as Name` for custom names
+- `activate/deactivate` for active periods
+- `alt/else/end` for conditionals
+- `loop/end` for loops
+- `Note over A,B: text` for notes
+
+---
+
+### Troubleshooting Section
+
+**Do:**
+- Include 5-8 common issues
+- Use consistent structure
+- Provide code solutions
+- Explain prevention
+- Cover both simple and complex issues
+
+**Don't:**
+- Skip symptoms or causes
+- Provide solutions without context
+- Use vague descriptions
+- Forget to include code examples
+
+**Issue Structure:**
+1. **Title:** Clear, specific issue name
+2. **Symptoms:** What user experiences
+3. **Possible Causes:** Why it happens (2-3 causes)
+4. **Solutions:** Code-based fixes (2-3 solutions)
+5. **Prevention:** How to avoid
+
+---
+
+## Diagram Guidelines
+
+### Use Mermaid (Not PlantUML)
+
+**Why Mermaid:**
+- Native GitHub/GitLab rendering
+- Better IDE support
+- Simpler syntax
+- No external server needed
+
+**Conversion from PlantUML:**
+
+PlantUML:
+```plantuml
+@startuml
+Alice -> Bob: Hello
+Bob --> Alice: Hi
+@enduml
+```
+
+Mermaid:
+```mermaid
+sequenceDiagram
+ Alice->>Bob: Hello
+ Bob-->>Alice: Hi
+```
+
+### Diagram Types
+
+**Layer Communication:**
+```mermaid
+graph TB
+ A[Widget] --> B[Hook]
+ B --> C[Store]
+ C --> D[SDK]
+```
+
+**Sequence Diagram:**
+```mermaid
+sequenceDiagram
+ participant A
+ participant B
+ A->>B: Request
+ B-->>A: Response
+```
+
+**Integration Flow:**
+```mermaid
+graph LR
+ A[App] -->|uses| B[Package]
+ B -->|calls| C[Dependency]
+```
+
+---
+
+## Validation Checklist
+
+Before considering ARCHITECTURE.md complete:
+
+### Content Completeness
+- [ ] Component overview complete
+- [ ] Component table has all major components
+- [ ] File structure matches reality
+- [ ] Data flow diagram included
+- [ ] 3-5 sequence diagrams included
+- [ ] 5-8 troubleshooting issues documented
+- [ ] Related docs linked
+
+### Diagram Quality
+- [ ] All diagrams use Mermaid (not PlantUML)
+- [ ] Diagrams render correctly
+- [ ] Labels are clear
+- [ ] Arrows show data flow direction
+- [ ] Colors used for emphasis (optional)
+- [ ] Diagrams are focused (not too complex)
+
+### Troubleshooting Quality
+- [ ] Each issue has symptoms
+- [ ] Each issue has 2-3 causes
+- [ ] Each issue has code solutions
+- [ ] Prevention tips included
+- [ ] Issues cover common scenarios
+
+### Formatting
+- [ ] Markdown renders correctly
+- [ ] Code blocks have language tags
+- [ ] Tables format properly
+- [ ] No broken links
+- [ ] Consistent heading levels
+
+---
+
+## Examples by Package Type
+
+### Widget Architecture
+
+**Focus:**
+- Widget → Hook → Component → Store → SDK flow
+- Initialization sequence
+- User interaction flows
+- Error handling
+- Store integration
+
+**Diagrams:**
+- Layer communication (5 layers)
+- Initialization sequence
+- User interaction sequence
+- Error handling sequence
+- Store update sequence
+
+**Troubleshooting:**
+- Widget not rendering
+- Callbacks not firing
+- Store not updating
+- Props not passing
+- Performance issues
+
+---
+
+### Store Architecture
+
+**Focus:**
+- Store structure
+- Observable management
+- Event handling
+- SDK integration
+- Data fetching
+
+**Diagrams:**
+- Store modules
+- Initialization flow
+- Event subscription
+- Data fetch flow
+- State update flow
+
+**Troubleshooting:**
+- Store not initializing
+- Events not firing
+- Data not updating
+- Memory leaks
+- Performance issues
+
+---
+
+### Component Library Architecture
+
+**Focus:**
+- Component structure
+- Props patterns
+- Composition
+- Styling approach
+- Momentum UI integration
+
+**Diagrams:**
+- Component hierarchy
+- Props flow
+- Event bubbling
+- Styling approach
+
+**Troubleshooting:**
+- Components not rendering
+- Props not passing
+- Styles not applying
+- Event handlers not firing
+- Performance issues
+
+---
+
+## Related Templates
+
+- **[create-agent-md.md](./create-agent-md.md)** - User-facing documentation
+
+---
+
+_Template Version: 1.0.0_
+_Last Updated: 2025-11-26_
+
diff --git a/ai-docs/templates/existing-widget/bug-fix.md b/ai-docs/templates/existing-widget/bug-fix.md
new file mode 100644
index 000000000..3ed087eff
--- /dev/null
+++ b/ai-docs/templates/existing-widget/bug-fix.md
@@ -0,0 +1,596 @@
+# Bug Fix Template
+
+## Overview
+
+This template guides you through fixing bugs in existing widgets following established patterns and ensuring no regressions.
+
+**Purpose:** Systematic approach to bug fixes
+
+**Scope:** Widgets, components, hooks, store integration
+
+---
+
+## When to Use
+
+- Reported bug in existing widget
+- UI not rendering correctly
+- Callbacks not firing
+- Store integration issues
+- Performance problems
+- Test failures
+
+---
+
+## Pre-Fix Questions
+
+### 1. Bug Information
+
+- **Which widget/component has the bug?** _______________
+- **Bug description (one sentence):** _______________
+- **Steps to reproduce:**
+ 1. _______________
+ 2. _______________
+ 3. _______________
+- **Expected behavior:** _______________
+- **Actual behavior:** _______________
+
+### 2. Bug Scope
+
+- **Which layer is affected?**
+ - [ ] Widget component
+ - [ ] Hook (helper.ts)
+ - [ ] Presentational component
+ - [ ] Store integration
+ - [ ] SDK integration
+
+- **Error messages:**
+ - Console errors: _______________
+ - Linter errors: _______________
+ - Test failures: _______________
+
+### 3. Impact Assessment
+
+- **Severity:** Critical / High / Medium / Low
+- **User Impact:** _______________
+- **Affects other widgets?** Yes / No
+ - If yes, which ones: _______________
+- **Is there a workaround?** Yes / No
+ - If yes, describe: _______________
+
+### 4. Existing Tests
+
+- **Is there a test for this scenario?** Yes / No
+- **Are tests failing?** Yes / No
+- **Test file location:** _______________
+
+---
+
+## Step 1: Understand the Bug
+
+### 1.1 Reproduce the Bug
+
+```typescript
+// Create minimal reproduction
+// 1. Set up component
+// 2. Trigger the bug
+// 3. Observe the issue
+```
+
+**Reproduction confirmed:** Yes / No
+
+### 1.2 Identify the Root Cause
+
+**Read relevant files:**
+- Widget component: `src/{widget-name}/index.tsx`
+- Hook: `src/helper.ts`
+- Presentational component: Check cc-components
+- Store: Check store integration
+- Types: `src/{widget-name}/{widget-name}.types.ts`
+
+**Check for:**
+- [ ] Missing null/undefined checks
+- [ ] Incorrect MobX usage (missing observer, runInAction)
+- [ ] Wrong prop types
+- [ ] Missing error boundaries
+- [ ] Race conditions
+- [ ] Memory leaks
+- [ ] Event listener issues
+
+**Root cause:** _______________
+
+### 1.3 Verify Layer Boundaries
+
+**Architecture check:**
+```
+✅ Widget → Hook → Component → Store → SDK
+❌ Widget → SDK (layer violation)
+❌ Component → Store (layer violation)
+```
+
+**Is there a layer violation?** Yes / No
+- If yes, this is likely the root cause
+
+---
+
+## Step 2: Plan the Fix
+
+### 2.1 Fix Strategy
+
+**Choose approach:**
+
+- [ ] **Defensive Fix:** Add null checks, error handling
+- [ ] **Refactor Fix:** Restructure code to prevent issue
+- [ ] **Pattern Fix:** Apply correct pattern (MobX, React)
+- [ ] **Integration Fix:** Fix store/SDK integration
+- [ ] **Type Fix:** Add/fix TypeScript types
+
+**Fix description:** _______________
+
+### 2.2 Files to Modify
+
+List all files that need changes:
+- [ ] `src/{widget-name}/index.tsx`
+- [ ] `src/helper.ts`
+- [ ] `src/{widget-name}/{widget-name}.types.ts`
+- [ ] `tests/{widget-name}/index.tsx`
+- [ ] `tests/helper.ts`
+- [ ] `ai-docs/ARCHITECTURE.md`
+- [ ] Other: _______________
+
+### 2.3 Breaking Changes?
+
+**Will this fix break existing functionality?** Yes / No
+
+If Yes:
+- Document breaking change
+- Update version (major/minor)
+- Update migration guide
+
+---
+
+## Step 3: Implement the Fix
+
+### 3.1 Widget Layer Fix (if needed)
+
+**File:** `src/{widget-name}/index.tsx`
+
+**Common fixes:**
+
+```typescript
+// Fix 1: Add null checks
+const {WidgetName}Internal: React.FC = observer((props) => {
+ const { data } = useHook(props);
+
+ // ✅ Add null check
+ if (!data) {
+ return
Loading...
;
+ }
+
+ return ;
+});
+```
+
+```typescript
+// Fix 2: Add error boundary
+Error occurred}
+ onError={(error) => {
+ console.error('Widget Error:', error);
+ props.onError?.(error); // Notify parent
+ }}
+>
+ <{WidgetName}Internal {...props} />
+
+```
+
+```typescript
+// Fix 3: Fix observer HOC
+// ❌ Wrong
+const Widget = (props) => { ... };
+
+// ✅ Correct
+const Widget = observer((props) => { ... });
+```
+
+### 3.2 Hook Layer Fix (if needed)
+
+**File:** `src/helper.ts`
+
+**Common fixes:**
+
+```typescript
+// Fix 1: Add proper cleanup
+useEffect(() => {
+ const subscription = store.cc.on('event', handler);
+
+ // ✅ Add cleanup
+ return () => {
+ subscription.unsubscribe();
+ };
+}, []);
+```
+
+```typescript
+// Fix 2: Fix runInAction usage
+// ❌ Wrong
+const handler = () => {
+ store.setSomeValue(newValue); // Direct mutation
+};
+
+// ✅ Correct
+const handler = () => {
+ runInAction(() => {
+ store.setSomeValue(newValue);
+ });
+};
+```
+
+```typescript
+// Fix 3: Fix dependency array
+// ❌ Wrong - missing dependency
+useCallback(() => {
+ doSomething(props.value);
+}, []); // Missing props.value
+
+// ✅ Correct
+useCallback(() => {
+ doSomething(props.value);
+}, [props.value]);
+```
+
+```typescript
+// Fix 4: Add error handling
+const fetchData = useCallback(async () => {
+ try {
+ const result = await store.cc.someMethod();
+ setData(result);
+ } catch (error) {
+ setError(error as Error);
+ props.onError?.(error as Error); // Notify parent
+ }
+}, [props]);
+```
+
+### 3.3 Component Layer Fix (if needed)
+
+**File:** cc-components component
+
+**Common fixes:**
+
+```typescript
+// Fix 1: Fix prop destructuring
+// ❌ Wrong - missing default
+const Component: React.FC = ({ items }) => {
+ return items.map(...); // Crashes if undefined
+};
+
+// ✅ Correct
+const Component: React.FC = ({ items = [] }) => {
+ return items.map(...);
+};
+```
+
+```typescript
+// Fix 2: Fix event handler
+// ❌ Wrong - inline function creates new reference
+