Skip to content

🔗 Package Dependencies

Every import relationship listed in this document is sourced from actual grep over the source code (not speculation) and reflects the real internal dependencies among the pkg/ and cmd/ packages.

Dependency Graph

pkg/domain is highlighted in yellow — it is the neutral hub, depended on by multiple SDK packages while itself depending on no project-internal package.

Verified Import Inventory

🖥️ Application Layer → SDK / Base Layer

PackageInternal Dependencies
cmd/composer-skillspkg/client, pkg/composer, pkg/domain

🔌 SDK Layer → Base Layer

PackageInternal Dependencies
pkg/composerpkg/detector, pkg/installer
pkg/clientpkg/domain
pkg/repositorypkg/domain

🧱 Base Layer → Base Layer

PackageInternal Dependencies
pkg/installerpkg/composerutils, pkg/composerutils/mock, pkg/detector
pkg/detectorNone (standard library only)
pkg/composerutilsNone (standard library only)
pkg/domainNone (standard library only)

Key Observations 🔍

  • pkg/domain is the neutral hub 🎯 — Both pkg/client and pkg/repository depend on it for return types, yet pkg/domain itself depends on no project-internal package.
  • pkg/composer does not depend on pkg/domain ⚠️ — The structured types returned by the CLI wrapper (AuditInfo, OutdatedInfo, etc.) are defined inside pkg/composer and are a separate set of types from the API model in pkg/domain.
  • pkg/installer is the most-dependent package in the base layer 📦 — It needs detection (detector), download and file operations (composerutils), and mocks for testing.
  • The application layer depends on only three packages ✅ — cmd/composer-skills gets the full capability surface through pkg/composer and pkg/client, never touching the base layer directly.

How to Verify

The dependencies in this table can be reproduced with the following command:

bash
grep -rh 'github.com/scagogogo/composer-skills/pkg/' pkg/ cmd/ --include='*.go' | grep -v _test.go | sort -u

No Circular Dependencies

Dependencies point strictly downward (Application Layer → SDK Layer → Base Layer); the base layer never imports upper layers in reverse, and the entire project is free of circular imports — the Go compiler rejects any real cycle.

Released under the MIT License