code-review

작성자: contentstack

PR 체크리스트—API 안정성, 문서, 오류, 호환성, 의존성/SCA, 테스트, 벤더 코드; 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

contentstack의 다른 스킬

cms-assets
contentstack
개발자에게 Contentstack에서 자산을 구성, 전달, 변환하는 방법에 대해 조언합니다. 폴더 구조, Image Delivery API 변환, 게시를 다룹니다...
cms-branches-aliases
contentstack
개발자에게 콘텐츠 개발 격리를 위한 Contentstack 브랜치와 무중단 콘텐츠 배포를 위한 별칭 사용에 대해 조언합니다. 브랜치 전략, …
cms-data-modeling-best-practices
contentstack
개발자들이 Contentstack에서 가장 간단하고 재사용 가능한 구조로 콘텐츠를 모델링하도록 안내합니다. 이 스킬은 콘텐츠 유형, 참조, 전역 필드를 언제 사용해야 하는지 설명합니다.
cms-live-preview-visual-builder-support-assistant
contentstack
Contentstack Live Preview 및 Visual Builder 구현을 진단하고 안내합니다. 미리보기 컨텍스트를 추적하고, 손상된 계약을 식별하며, 다음을 권장합니다…
cms-releases
contentstack
개발자들이 Contentstack Releases를 사용하여 조정되고 원자적인 콘텐츠 배포를 수행하는 방법에 대해 조언합니다. 릴리스 생성, 항목 관리, 단계적 배포 등을 다룹니다. …
cms-roles-permissions
contentstack
개발자들에게 Contentstack에서 역할, 권한, 팀, 토큰 액세스를 설계하는 방법을 조언합니다. 기본 제공 역할, 사용자 지정 역할, 권한 병합 등을 설명합니다.
cms-taxonomy
contentstack
개발자들에게 Contentstack Taxonomy를 구조화되고 계층적인 콘텐츠 분류 및 전달 측 필터링에 사용하는 방법에 대해 조언합니다. 분류 체계와 태그의 차이 등을 다룹니다…
cms-tokens-authentication
contentstack
개발자에게 프론트엔드, 백엔드, 자동화, 타사 앱 사용 사례에 적합한 Contentstack 인증 방법과 토큰 유형 선택에 대해 조언합니다.…