Skip to content

Comments

doc(contact-center): add ai-docs SDD templates for code generation#4722

Open
ciscoRankush wants to merge 1 commit intowebex:task-refactorfrom
ciscoRankush:SPARK-775697Templates
Open

doc(contact-center): add ai-docs SDD templates for code generation#4722
ciscoRankush wants to merge 1 commit intowebex:task-refactorfrom
ciscoRankush:SPARK-775697Templates

Conversation

@ciscoRankush
Copy link

@ciscoRankush ciscoRankush commented Feb 19, 2026

COMPLETES #SPARK-775697

This pull request addresses

AI agents working on the @webex/contact-center SDK need structured code generation templates that enforce a spec-driven workflow — gathering requirements, presenting spec summaries for developer approval, and
following validation checklists before completing work. Without these templates, agents produce inconsistent code that misses SDK patterns like LoggerProxy, MetricsManager, and error handling.

by making the following changes

  • Adds ai-docs/templates/ with 5 template files across 2 categories:
    • existing-service/ (2 files) — Bug-fix template with Section A/B split (developer questions vs agent investigation) and root-cause gate; Feature-enhancement template with always-present placement triage, Type
      F skip-triage support, and spec summary gate
    • documentation/ (2 files) — Templates for generating service-level AGENTS.md and ARCHITECTURE.md
    • README.md — Template index with categories, directory structure, and usage flow

All templates include:
- STOP gates preventing code generation before information gathering
- Interrogative phrasing (questions, not fill-in forms)
- MANDATORY/OPTIONAL labels per section
- Completion gates with checklists
- Spec summary templates requiring developer approval
- Direct clickable links to related files (no vague references)

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  1. Type A (New Service) — Simulated "Create a new Analytics service" prompt; verified decision tree routing, pre-questions STOP gate, all 9 questions interrogative, sections numbered 1-6 (no duplicates),
    MANDATORY/OPTIONAL labels, completion gate, spec summary, and 05-validation.md links to root AGENTS.md Service Routing Table
  2. Type B (New Method) — Verified 01-requirements.md has STOP gate, 12 interrogative questions, event contract table, metrics section, completion gate, spec summary with getBuddyAgents example
  3. Type C (Bug Fix) — Simulated "consultTransfer is broken" prompt; verified Section A STOP gate blocks investigation, 6 interrogative questions, completion gate, root-cause gate (Step 3) requires developer
    approval
  4. Type D (Feature Enhancement) — Verified Step 0 triage always presented, spec summary gate present, completion gate with 8 items
  5. Type F (Modify Existing Method) — Simulated "Update stationLogin method" prompt; verified skip-triage Note links to root AGENTS.md with clickable path, jumps to Step 0B correctly
  6. Link Validation — All relative links in template files verified (pattern links use ../../patterns/, AGENTS.md paths use ../../../AGENTS.md)

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Claude Code (Claude Opus 4.6)
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

@ciscoRankush ciscoRankush requested a review from a team as a code owner February 19, 2026 09:29
@ciscoRankush ciscoRankush changed the title feat(contact-center): add ai-docs SDD templates for code generation doc(contact-center): add ai-docs SDD templates for code generation Feb 19, 2026
@Shreyas281299 Shreyas281299 added the validated If the pull request is validated for automation. label Feb 20, 2026
@Shreyas281299
Copy link
Contributor

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d7d180360

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@Shreyas281299 Shreyas281299 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial Review.

  • new-method
  • new-service
    Above folders are still left to be reviewed

@Shreyas281299
Copy link
Contributor

@codex review the PR more thoroughly, the PR is to create templating that will be used the AI agents to detect the type of task the user is prompting it to do

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d7d180360

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ciscoRankush pushed a commit to ciscoRankush/webex-js-sdk that referenced this pull request Feb 20, 2026
Changes based on reviewer feedback on PR webex#4722:
- Fix validation commands in all 4 templates to use actual workspace
  scripts: test:styles, test:unit, build:src
- Clarify event contract "Emitted/Received On" field to explicitly ask
  which object (cc, task, taskManager) the event is emitted/received on

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ciscoRankush pushed a commit to ciscoRankush/webex-js-sdk that referenced this pull request Feb 23, 2026
Changes based on reviewer feedback on PR webex#4722:
- Fix validation commands in all 4 templates to use actual workspace
  scripts: test:styles, test:unit, build:src
- Clarify event contract "Emitted/Received On" field to explicitly ask
  which object (cc, task, taskManager) the event is emitted/received on

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tions

Add Spec-Driven Development templates for modifying existing services:
- existing-service/bug-fix.md — Section A/B workflow with STOP gate,
  6 interrogative questions, root-cause gate before implementation
- existing-service/feature-enhancement.md — Always-present placement
  triage, Type F skip-triage support, spec summary gate
- documentation/create-agents-md.md — Template for service AGENTS.md
- documentation/create-architecture-md.md — Template for ARCHITECTURE.md
- templates/README.md — Template index with categories and usage flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants