code-review

Checklist PR — stabilité de l'API, documentation, erreurs, compatibilité, dépendances/SCA, tests, code vendored ; Blocker/Major/Minor.

npx skills add https://github.com/contentstack/contentstack-utils-swift --skill code-review

Code review – Contentstack Utils Swift

When to use

  • Reviewing a PR, self-review before submit, or automated review prompts.

Instructions

Work through the checklist below. Optionally tag findings: Blocker, Major, Minor.

API design and stability

  • Public API: New or changed public / open types in Sources/ContentstackUtils/ are necessary, semver-conscious, and documented (README.md / CHANGELOG.md when user-visible).
  • Backward compatibility: No breaking changes unless explicitly justified (e.g. major version). Prefer additive behavior and default Option() paths.
  • Naming: Matches existing Utils and RTE terminology (ContentstackUtils, Option, Node, GQL, etc.).

Error handling and robustness

  • Errors: New throws paths use clear domain types (e.g. VariantUtilityError); callers can distinguish invalid input from parsing failures where relevant.
  • Optionals: No force-unwraps on public code paths; document preconditions for non-optional parameters.
  • RTE JSON: Decoding and HTML traversal stay tolerant of documented stack payload shapes; embedded-item regressions are called out.

Dependencies and security

  • Dependencies: Package.swift / ContentstackUtils.podspec changes are justified; versions do not introduce known vulnerabilities.
  • SCA: Address security findings (e.g. Snyk, org scanners) in the PR or via an agreed follow-up.

Testing

  • Coverage: New or modified behavior in Sources/ContentstackUtils/ has tests under Tests/ContentstackUtilsTests/ when feasible.
  • Quality: Tests are readable, deterministic, and follow naming/mocks conventions.

Vendored and native code

  • Kanna / libxml2 / Modules/: Reviewed for upstream parity, licensing, and Apple vs Linux builds.

Severity (optional)

LevelExamples
BlockerBreaking public API without approval; security issue; no tests for new code where tests are practical
MajorInconsistent errors; README examples that do not compile
MinorStyle; minor docs

Detailed review themes (from checklist sections)

  • API: Breaking public/open without semver/CHANGELOG/podspec alignment.
  • Errors: throws changes that confuse callers without a version strategy.
  • README: Examples must match real APIs (jsonToHtml overloads, GQL.jsonToHtml).
  • Dependencies: New packages in Package.swift / podspec need justification.

References

  • skills/testing/SKILL.md
  • skills/contentstack-utils/SKILL.md

Plus de skills de contentstack

brand-kit-assistant
contentstack
Advise users on Contentstack Brand Kit concepts, setup, governance, and on-brand AI generation. Route API-specific tasks to the right Brand Kit capability or…
official
cms-assets
contentstack
Conseiller les développeurs sur l'organisation, la livraison et la transformation des assets dans Contentstack. Couvrir la structure des dossiers, les transformations de l'API de livraison d'images, la publication…
official
cms-branches-aliases
contentstack
Advise developers on using Contentstack branches for isolated content development and aliases for zero-downtime content deployments. Cover branch strategy,…
official
cms-data-modeling-best-practices
contentstack
Guidez les développeurs pour modéliser le contenu dans Contentstack en utilisant la structure réutilisable la plus simple. La compétence explique quand utiliser les types de contenu, les références, les éléments globaux…
official
cms-entries
contentstack
Advise developers on querying, localizing, versioning, publishing, and structuring Contentstack entries for efficient delivery. Focus on CDA usage, reference…
official
cms-environments-publishing
contentstack
Conseiller les développeurs sur la configuration des environnements, la publication de contenu, l'utilisation des jetons de livraison et d'aperçu, l'exploitation de l'API Sync, et la compréhension du CDN et…
official
cms-live-preview-visual-builder-support-assistant
contentstack
Diagnose and guide Contentstack Live Preview and Visual Builder implementations. Trace preview context, identify the broken contract, and recommend the…
official
cms-localization
contentstack
Advise developers on Contentstack localization: language setup, fallback chains, localized vs unlocalized entries, non-localizable fields, and multi-locale…
official