docs(contact-center): fix unresolved SDD review comments#4789
docs(contact-center): fix unresolved SDD review comments#4789ciscoRankush wants to merge 2 commits intowebex:task-refactorfrom
Conversation
Fix 10 unresolved review comments from merged PRs webex#4721, webex#4722, webex#4723, webex#4734, webex#4735: 1. AGENTS.md: Distinguish UI/UX fix vs code-level defect in task classification 2. bug-fix.md: Explain what "regression test" means 3. feature-enhancement.md: Add descriptive context for Step 1 4. feature-enhancement.md: Mark Plugin Layer (cc.ts) step as conditional 5. create-architecture-md.md: Note file structure belongs in AGENTS.md 6. new-service/01-pre-questions.md: Club Dependencies and Exposure sections 7. new-method/01-requirements.md: Add callout to create type definitions 8. new-method/02-implementation.md: Fix cc.services.queue → cc.queue 9. new-method/03-tests.md: Add exact match assertion guidelines 10. new-service/02-code-generation.md: Complete sub-module example Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de8bebf8d8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const queues = await cc.services.queue.getQueues(); | ||
| // Consumer code calling service directly via public accessor | ||
| const queues = await cc.queue.getQueues(); | ||
| const addressBooks = await cc.addressBook.getAddressBooks(); |
There was a problem hiding this comment.
Use the real AddressBook API in the direct-access example
AddressBook does not expose getAddressBooks() anywhere in this package; its public fetch method is getEntries() in src/services/AddressBook.ts. Anyone following this updated example for a direct-service method will copy a call that does not exist and end up with broken sample code/tests, which is exactly the kind of SDK-surface mismatch this PR is trying to remove.
Useful? React with 👍 / 👎.
| **Method**: `getBuddyAgents(data: BuddyAgents): Promise<BuddyAgentsResponse>` | ||
| **Target file**: cc.ts | ||
| **Purpose**: Get list of available agents for consult/transfer | ||
| **Types to create**: Define `BuddyAgents` (request params) and `BuddyAgentsResponse` (response) in the appropriate types file (`src/types.ts` for public types, or `src/services/[service]/types.ts` for internal types). Export public types from `src/types.ts`. |
There was a problem hiding this comment.
Include the package entrypoint in the new public type guidance
This new instruction makes it sound like adding a public type to src/types.ts is sufficient, but @webex/contact-center exposes consumer-facing types through explicit re-exports in src/index.ts (for example, BuddyAgents and BuddyAgentsResponse). For any new public method, following this template as written will leave the new types unavailable from the package root even though they were defined locally.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
#4722 (comment)
This comment isn't addressed yet
There was a problem hiding this comment.
Addressed in 6414ba6 — Removed duplicate questions 5 and 6. They were already covered as conditional fallbacks under question 3 ("If the developer cannot reproduce it, ask: error messages, trackingId, recent changes"). No information is lost.
There was a problem hiding this comment.
Addressed in 6414ba6 — Added "(All Mandatory)" to the heading and a note: "All 6 questions must be answered before proceeding. If the developer is unsure about a question, help them reason through it using the decision signals below."
| ``` | ||
|
|
||
| ### Plugin Layer (cc.ts) | ||
| ### Plugin Layer (cc.ts) — if the feature is exposed as a public API |
There was a problem hiding this comment.
In this comment: #4722 (comment), what I meant was that everywhere we are talking about public method being exposed from cc object but we also expose public method from task object and in future we might have other objects introduced as well so documentation should clearly state that
There was a problem hiding this comment.
Addressed in 6414ba6 — Renamed section from "Plugin Layer (cc.ts)" to "Public API Layer — if the feature is exposed to consumers". The note now uses generic language and lists the current public objects as examples:
- cc (cc.ts) — SDK-level operations (e.g., stationLogin, setAgentState)
- task (Task.ts) — per-interaction operations (e.g., hold, transfer, end)
Also notes that new public objects may be introduced in the future. Same approach applied across 02-implementation.md and 00-master.md.
There was a problem hiding this comment.
Addressed in 6414ba6 — Rewrote Method Invocation Patterns section with generic language ("the owning object") and added a Task.ts example (task.hold()) alongside the existing cc.ts example. Also fixed getAddressBooks() to getEntries() to match the actual AddressBook.ts API.
|
|
||
| If the method needs to emit events, understand the two-step flow used in the SDK: | ||
|
|
||
| ### How it works: WebSocket trigger → EventEmitter emit |
There was a problem hiding this comment.
Addressed in 6414ba6 — Changed "agent service methods" to "all AQM-integrated services — agent, task, etc., except config service GET methods". Verified that task/contact.ts uses aqm.req() extensively (accept, hold, consult, transfer, etc.).
Shreyas281299
left a comment
There was a problem hiding this comment.
Looks good to me, Can we addressed the 4 open comments from Priya
- bug-fix.md: remove duplicate questions 5-6 (already covered as fallbacks under question 3) - feature-enhancement.md: mark all triage questions as mandatory, rename Plugin Layer to generic "Public API Layer" with cc and task as examples of owning objects - new-method/00-master.md: use generic phrasing for public objects - new-method/02-implementation.md: add Task.ts example alongside cc.ts, fix getAddressBooks() to getEntries(), broaden AQM req scope to include task service Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6414ba6b04
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| > **Determine the owning object.** Public methods are added to the object that owns the feature's scope. Currently the SDK exposes: | ||
| > - **`cc`** (in `cc.ts`) — SDK-level operations (e.g., `cc.stationLogin()`, `cc.setAgentState()`) | ||
| > - **`task`** (in `Task.ts`) — per-interaction operations (e.g., `task.hold()`, `task.transfer()`, `task.end()`) | ||
| > |
There was a problem hiding this comment.
Describe all currently exposed public API objects
This new guidance says the SDK currently exposes only cc and task, but consumers also use public service objects like cc.addressBook and cc.queue (see src/cc.ts public properties and examples). If template users follow this as written, feature work for those existing public surfaces can be implemented in the wrong layer or miss required surface updates, creating API inconsistencies in generated changes.
Useful? React with 👍 / 👎.
COMPLETES #SPARK-775697
This pull request addresses
Unresolved review comments from 5 merged SDD PRs (#4721, #4722, #4723, #4734, #4735) that were not addressed before merging into
task-refactor. These include inaccurate code examples, missing explanations, incomplete template sections, and documentation that doesn't match SDK access patterns.by making the following changes
cc.services.queue.getQueues()→cc.queue.getQueues()to match actual SDK access pattern (comment on docs(contact-center): add SDD templates for new method creation #4735)expect.objectContaining(comment on docs(contact-center): add SDD templates for new method creation #4735)Change Type
The following scenarios were tested
cc.queue/cc.addressBookaccess pattern matches actual source code incc.tsThe GAI Coding Policy And Copyright Annotation Best Practices
I certified that