Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 2.58 KB

AGENTS.md

File metadata and controls

17 lines (16 loc) · 2.58 KB

AddonPay repository rules

  • The only unscoped public package is addon-pay.
  • Every other public package must use the @addon-pay/* scope.
  • The Nx project name of every published package must exactly match its package.json name so release tags and GitHub Release titles remain user-facing package names.
  • addon-pay is the single installable facade and the Addon Bone-first developer experience. It owns the public addonPay facade, its configuration-plugin entry point, and convenience subpath exports such as addon-pay/react.
  • The addon-pay facade may compose and re-export scoped packages, but must not own their low-level implementation. Browser, mobile, DOM, framework, API-transport, and messaging implementations belong in scoped packages.
  • The default Addon Bone flow imports its configuration plugin from addon-pay/plugin and configures it once with plugins: [addonPay("addon-id")]. Afterwards all extension contexts use the runtime facade through import addonPay from "addon-pay"; the plugin/service runtime supplies the messaging bridge.
  • Scoped packages implement the actual capabilities: the platform-neutral runtime SDK, UI adapters, platform transports, and the server-only @addon-pay/client control-plane API. They may depend on one another, while addon-pay composes the supported default experience.
  • @addon-pay/sdk is the server-facing runtime SDK. It owns AddonPay API access, entitlements, offerings, paywall data, and checkout actions; UI packages must not duplicate those models or business rules.
  • Framework UI integrations are separate scoped packages and are exposed through the facade only as convenience subpaths. Do not create a public headless paywall package unless it later gains an independent, non-duplicative responsibility.
  • A non-Addon Bone extension needs an explicit platform transport/configuration. Its scoped package is named @addon-pay/extension; the facade may offer an ergonomic configuration path for it.
  • Build-tool plugins, such as Vite or Rspack integrations, are separate scoped packages only when they provide a useful standalone integration.
  • @addon-pay/client is the server-only control-plane API client. Never expose its privileged credentials or operations through the extension-facing facade.
  • Use Conventional Commits. Nx Release owns version changes, tags, changelogs, GitHub Releases, and publishing.
  • After bootstrap, do not manually edit package versions, create release tags, or run npm publish/pnpm publish.
  • Keep each package's repository.url and repository.directory accurate so npm provenance links back to this repository.