Skip to content

docs(sdd): bootstrap SDD foundation for components - #859

Open
akulakum wants to merge 4 commits into
webex:masterfrom
akulakum:SDLC_SKILLS_FOR_COMPONENTS
Open

docs(sdd): bootstrap SDD foundation for components#859
akulakum wants to merge 4 commits into
webex:masterfrom
akulakum:SDLC_SKILLS_FOR_COMPONENTS

Conversation

@akulakum

@akulakum akulakum commented Jul 23, 2026

Copy link
Copy Markdown

COMPLETES #https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-838067

This pull request addresses

webex/components has no Spec-Driven Development (SDD) foundation for AI-assisted development. Without standing docs, module specs, and a machine-readable manifest, agents and contributors lack a consistent entry point, task routing, and spec coverage tracking.

This PR bootstraps SDD Stage 0 using SDLC-Skills v0.4.3 (sdd-bootstrap plugin). No application/runtime code is changed.

by making the following changes

Added — SDD standing docs (ai-docs/)

  • ARCHITECTURE.md — system layout, adapter-injection model, build/publish flow
  • CONTRACTS.md — public npm export catalog
  • GETTING_STARTED.md — clone, build, test, Storybook
  • RULES.md, GLOSSARY.md, SECURITY.md, REVIEW_CHECKLIST.md, SPEC_INDEX.md
  • patterns/ — co-located tests, wxc- class prefix, withAdapter injection

Added — module specs (3 modules, all Specced)

Module Spec Coverage
src/components/ src/components/ai-docs/components-spec.md ~96%
src/adapters/ src/adapters/ai-docs/adapters-spec.md ~97%
src/styles/ src/styles/ai-docs/styles-themes-spec.md ~96%

Added — agent entry point & manifest

  • AGENTS.md — agent router and repo context
  • .sdd/manifest.json — module registry, commands, coverage state, validation policy

Updated — .gitignore

  • !.sdd/manifest.json — exception so manifest is tracked despite repo-wide *.json ignore
  • .generated/ — excludes SDD skill temp outputs (questionnaire, conformance/validation reports)

Explicitly not included (local-only / install artifacts)

  • .cursor/, .agents/, .claude/ — runtime skill bundles
  • .sdd/templates/, .sdd/metrics/ — copied SDLC-Skills templates
  • .generated/ — bootstrap working files

Follow-up required (Session B)

Manifest validation.status is not-run. A separate spec-validator run (different runtime than the generator, per minimum_independence: different-runtime) is required before the repo is SDD-ready.

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

  • The testing is done with the amplify link
  • Docs-only change — no runtime behavior modified
  • Generated-doc conformance review: 0 Blocking findings (bootstrap gate)
  • Verified .sdd/manifest.json stages and tracks correctly after .gitignore exception
  • spec-validator independent validation — pending Session B

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 - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document

akulakum and others added 3 commits July 23, 2026 13:03
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@akulakum

Copy link
Copy Markdown
Author

================================================================================
SDD SPEC VALIDATION REPORT — SUCCESS (Session B / Independent Runtime)

PR: SDLC Stage 0 bootstrap — webex/components
Branch: SDLC_SKILLS_FOR_COMPONENTS
Validated commit: c014045
Validation date: 2026-07-23
Validator: Codex (codex-agent-session / gpt-5)
Generator (Session A): Cursor (cursor-agent-session / composer)

Purpose:
This comment records the successful independent spec-validation (Session B) for the
SDD Stage 0 bootstrap docs in this PR. Validation was run per SDLC-Skills
spec-validator skill with minimum_independence = different-runtime.

FINAL RESULT

Status: SUCCESS — Pass with warnings
Gate: PASS
Blocking findings: 0

This means the SDD docs in this PR passed both:

  • Axis A (methodology / SDD manifest rules)
  • Axis B (docs match actual code)

Run ID: validation-2026-07-23T085321Z
Local report (not committed, per SDD policy):
.generated/sdd/validation/validation-2026-07-23T085321Z/validation-report.md

RUNTIME INDEPENDENCE

Generator: cursor-agent-session | run bootstrap-2026-07-23T124500Z
Validator: codex-agent-session | run validation-2026-07-23T085321Z
Policy: different-runtime — SATISFIED

WHAT WAS VALIDATED

  • .sdd/manifest.json
  • AGENTS.md, ai-docs/* (standing docs + patterns)
  • src/components/ai-docs/components-spec.md
  • src/adapters/ai-docs/adapters-spec.md
  • src/styles/ai-docs/styles-themes-spec.md
  • Code cross-checks: src/, package.json, rollup.config.js, README.md

KEY PASSES

  • 0 blocking methodology or code drift findings
  • Public npm exports match src/index.js + src/components/index.js + CONTRACTS.md
  • Only WebexJSONAdapter is a public adapter export; domain adapters are internal
  • Meeting control registry matches code (DISABLED_JOIN_CONTROL documented correctly)
  • Module specs follow template order and section profiles
  • Requirement IDs and WHAT/WHY rows valid across all module specs
  • Bootstrap questionnaire and conformance evidence present (0 blocking)

NON-BLOCKING WARNING (1)

Module spec metadata still has approved_by = "pending PR approval".
Update approver name/date after PR merge approval in:

  • src/components/ai-docs/components-spec.md
  • src/adapters/ai-docs/adapters-spec.md
  • src/styles/ai-docs/styles-themes-spec.md

VALIDATION HISTORY (this branch)

  1. validation-2026-07-23T080630Z @ f9f0f35 — BLOCKED (adapter export + control registry drift)
  2. validation-2026-07-23T083549Z @ c014045 — BLOCKED (module spec template order)
  3. validation-2026-07-23T085321Z @ c014045 — PASS WITH WARNINGS (final / success)

EVAL SUMMARY

axis_a_fail: 0 | axis_b_fail: 0 | blocking: 0 | important: 1
hallucinated_api_count: 0 | include_if_violations: 0

CONCLUSION

SDD Stage 0 bootstrap for webex/components is spec-validation SUCCESSFUL.
Independent runtime validation passed with zero blocking findings.
Docs-only PR — no runtime/application code changes.

================================================================================

Comment thread AGENTS.md
@@ -0,0 +1,106 @@
# AGENTS.md — webex/components

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These generated docs are missing the hidden template metadata block (Template, Template-ID, Generates, library version, and last updated). The template library explicitly says to preserve that block, and it is absent from all 15 generated Markdown files. Could we restore it across the generated docs so their provenance stays traceable?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — restored the hidden template metadata block (Template, Template-ID, Generates, library version, last updated) on all 15 generated Markdown files.

Comment thread AGENTS.md Outdated
## Common Gotchas

- **Styles side effect:** `src/index.js` imports `./styles/index.scss` — consumers must load compiled CSS from `dist/css/webex-components.css` or equivalent.
- **Adapter connect lifecycle:** `withAdapter` renders children only after `adapter.connect()` resolves; components may briefly render without adapter context.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This reads as contradictory and does not match withAdapter.jsx. The wrapped component is rendered immediately; while connect() is pending, it is returned without WebexDataProvider, and the provider is added only after adapterConnected becomes true. Can we document that actual lifecycle here and update the corresponding requirement and sequence diagram as well?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — updated AGENTS.md, components-spec (COMP-R-002, sequence diagram, pitfalls), and the with-adapter-injection pattern to match withAdapter.jsx: wrapped component renders immediately without WebexDataProvider while connect is pending; provider is added only after adapterConnected is true.

| components.WebexDataProvider | SDK export | Context provider | Pass adapter to subtree | Semver | `src/components/WebexDataProvider/WebexDataProvider.jsx` | `ai-docs/CONTRACTS.md` |
| components.useMeetingDestination | SDK export | Hook | Resolve meeting destination | Semver | `src/components/hooks/useMeetingDestination.js` | `ai-docs/CONTRACTS.md` |

Full export list: `src/components/index.js`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The template calls for one Public Surface row per exported symbol. This table has four rows, while src/components/index.js exports 31 symbols, so pointing readers to the barrel leaves most of the API contract undocumented. Could we add the missing exports and then recalculate the 96% coverage score?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — expanded Public Surface to all 31 barrel exports from src/components/index.js and updated coverage score to 98% in the module spec and manifest.

Comment thread ai-docs/REVIEW_CHECKLIST.md Outdated

| # | Check | When it applies | What it verifies | Severity |
|---|---|---|---|---|
| K1 | Regression guard | Changing adapter observables or public props | Existing tests still pass; snapshots reviewed | Important |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This weakens K1 compared with the source template. In v0.2.1, K1 is Blocking and also applies to weakly covered modules or any MODIFIED/REMOVED requirement, with positive and negative characterization coverage. Can we keep those semantics here so this repo does not silently lower the validation gate?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — restored REVIEW_CHECKLIST K1–K4, cross-cutting checks, and selection/output sections from template v0.2.1. K1 is Blocking again with characterization baseline + positive/negative coverage semantics.

Comment thread .sdd/manifest.json Outdated
"enforces_domain_rules": false,
"is_concurrent_async": true,
"owns_persistence": false,
"returns_caller_errors": false,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

returns_caller_errors: false does not match the adapters. Several methods surface invalid ID or data cases through observer.error(...); marking this false causes the generated adapter spec to omit the required Error Handling and Failure Modes section. Can we set this to true and document the error conditions and caller recovery paths?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — set adapters module returns_caller_errors: true in manifest and added Error Handling & Failure Modes section to adapters-spec documenting observer.error(...) conditions and caller recovery paths.

Comment thread .sdd/manifest.json Outdated
"source_commit": null,
"base_ref": "master",
"head_ref": "SDLC_SKILLS_FOR_COMPONENTS",
"status": "not-run"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR notes say independent validation passed, but the committed source of truth still has null validator/runtime/run fields, no source commit, and status: "not-run"; the module specs say the same. Can we update the committed validation metadata to match the completed run, or leave the PR described as pending until it has been recorded?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — updated manifest validation block with Codex Session B results (codex-agent-session, run validation-2026-07-23T085321Z, source commit c0140453, status pass-with-warnings) and synced Validation status rows in all three module specs.

Comment thread ai-docs/CONTRACTS.md
| pkg.AdapterContext | components | AdapterContext | React context for adapter | Semver beta | `src/components/index.js` |
| pkg.MeetingContext | components | MeetingContext | React context for meeting scope | Semver beta | `src/components/index.js` |
| pkg.css.bundle | styles-themes | webex-components.css | Compiled stylesheet | Semver beta | `dist/css/webex-components.css` |
| pkg.themes | styles-themes | dist/themes/* | Theme asset folders | Semver beta | `rollup.config.js` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

styles-themes and the manifest both list dist/assets/fonts/ as a published asset, but it is missing from this root contract catalog. The Requires table also drops the schema/detail and fallback columns from the template. Could we bring this catalog back in sync with the manifest and template?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — added pkg.fonts (dist/assets/fonts/*) to Exported API and expanded Requires table with schema/detail link, availability assumption, and fallback columns per template.

Comment thread ai-docs/ARCHITECTURE.md Outdated
- **Published artifact:** `@webex/components` npm package consumed by host applications and widgets.
- **SDD tooling source:** `SDLC-Skills` plugin installed locally (not a runtime dependency).

Evidence: `README.md`, `package.json`, `.sdd/metrics/source.env`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

.sdd/metrics/source.env is not part of this PR, and the PR discussion says .sdd/metrics is local-only, so this evidence cannot be checked from the repository. Could we replace it with committed source evidence or remove the claim? The CI description below should also match the branch filters in .circleci/config.yml rather than implying every job runs in one linear chain.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 11c6ca9 — removed .sdd/metrics/source.env from evidence (local-only) and replaced CI description with the actual CircleCI workflow including branch filters (Chromatic on non-master, build on master only).

…acts

Restore template provenance blocks, fix withAdapter lifecycle docs, expand
components Public Surface, restore REVIEW_CHECKLIST K1, add adapter error
handling, sync validation metadata and CONTRACTS/ARCHITECTURE with code.

Co-authored-by: Cursor <cursoragent@cursor.com>
@akulakum
akulakum requested a review from bhabalan July 27, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants