You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Follow:** Feature addition workflow with backward compatibility
49
52
50
53
**D. Generate/Update Documentation Only**
54
+
51
55
- Developer needs documentation for existing code
52
56
-**Route to:**[templates/documentation/create-agent-md.md](./ai-docs/templates/documentation/create-agent-md.md) and [templates/documentation/create-architecture-md.md](./ai-docs/templates/documentation/create-architecture-md.md)
53
57
-**Follow:** Documentation templates (reusable for all packages)
54
58
55
59
**E. Understanding Architecture**
60
+
56
61
- Developer needs to understand how something works
57
62
-**Read:** That scope's `ai-docs/AGENTS.md` (usage) and `ai-docs/ARCHITECTURE.md` (technical details); use [Package and widget ai-docs reference](#package-and-widget-ai-docs-reference) to find the path.
58
63
-**Available for:** station-login, user-state, store, cc-components, cc-widgets, ui-logging, test-fixtures; for task package use per-widget ai-docs (CallControl, IncomingTask, OutdialCall, TaskList).
@@ -67,21 +72,21 @@ If the developer's message contains multiple distinct task types (for example, "
67
72
68
73
```typescript
69
74
// ❌ WRONG - Circular dependencies
70
-
import {Widget} from'@webex/cc-widgets';// In widget package code
71
-
import {Widget} from'@webex/cc-widget-name';// In cc-components code
75
+
import {Widget} from'@webex/cc-widgets'; // In widget package code
76
+
import {Widget} from'@webex/cc-widget-name'; // In cc-components code
- ✅ Parameters (names, types, required vs optional)
245
271
- ✅ Return type
@@ -319,6 +345,7 @@ SDK (Contact Center API)
319
345
```
320
346
321
347
**Key Rules:**
348
+
322
349
- Widget consumes SDK methods via the store (through a hook) — it NEVER calls the SDK directly
323
350
- Component NEVER accesses store (receives props)
324
351
- Always use `observer` HOC for widgets
@@ -335,6 +362,7 @@ SDK (Contact Center API)
335
362
You must have already completed that template's pre-step section (Pre-Enhancement Questions, Pre-Fix Questions, or 01-pre-questions as applicable); if not, do that first.
336
363
337
364
**During code generation:**
365
+
338
366
1. Follow pattern documentation strictly
339
367
2. Reference existing widgets for examples
340
368
3. Use proper TypeScript types (no `any`)
@@ -440,6 +468,7 @@ yarn build
440
468
```
441
469
442
470
**Common errors:**
471
+
443
472
- Missing types → Add type definitions
444
473
- Import errors → Check paths and exports
445
474
- Circular dependencies → Refactor imports
@@ -458,46 +487,60 @@ yarn build
458
487
### Documentation to Consider
459
488
460
489
**If new widget created:**
490
+
461
491
- Generated via templates (AGENTS.md + ARCHITECTURE.md)
462
492
463
493
**If widget modified:**
494
+
464
495
- Update: `packages/contact-center/{widget-name}/ai-docs/AGENTS.md` (if API changed)
0 commit comments