code-review

PR-Checkliste – API-Stabilität, Dokumentation, Fehler, Kompatibilität, Abhängigkeiten/SCA, Tests, vendored Code; 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

Mehr Skills von contentstack

cms-assets
contentstack
Entwickler bei der Organisation, Bereitstellung und Transformation von Assets in Contentstack beraten. Ordnerstruktur, Transformationen über die Image Delivery API, Veröffentlichung abdecken…
cms-branches-aliases
contentstack
Entwickler beraten, wie Contentstack-Branches für isolierte Content-Entwicklung und Aliase für Content-Bereitstellungen ohne Ausfallzeiten genutzt werden können. Branch-Strategie abdecken, …
cms-data-modeling-best-practices
contentstack
Leiten Sie Entwickler an, Inhalte in Contentstack mit der einfachsten wiederverwendbaren Struktur zu modellieren. Die Fertigkeit erklärt, wann Inhaltstypen, Referenzen, globale…
cms-live-preview-visual-builder-support-assistant
contentstack
Diagnostizieren und leiten Sie Contentstack Live Preview- und Visual Builder-Implementierungen. Verfolgen Sie den Vorschaukontext, identifizieren Sie den defekten Vertrag und empfehlen Sie die…
cms-releases
contentstack
Entwickler bei der Nutzung von Contentstack Releases für koordinierte, atomare Content-Bereitstellungen beraten. Release-Erstellung, Elementverwaltung, gestaffelte Bereitstellung abdecken, …
cms-roles-permissions
contentstack
Entwickler bei der Gestaltung von Rollen, Berechtigungen, Teams und Token-Zugriff in Contentstack beraten. Integrierte Rollen, benutzerdefinierte Rollen, Berechtigungszusammenführung, … erklären.
cms-taxonomy
contentstack
Entwickler beraten, wie Contentstack Taxonomy für strukturierte, hierarchische Inhaltsklassifizierung und auslieferungsseitige Filterung verwendet wird. Behandelt Taxonomy vs. Tags, …
cms-tokens-authentication
contentstack
Entwickler beraten, wie sie die richtige Contentstack-Authentifizierungsmethode und den passenden Token-Typ für Frontend-, Backend-, Automatisierungs- und Drittanbieter-App-Anwendungsfälle auswählen.…