checkout-kit
AGENTS.md7 starsChanged 24 days agoMITView on GitHub
AI agents: All commands require the shadowenv exec -- prefix to run inside the shadowenv-managed environment. Run dev commands from the repo root or any platform directory. Use dev up before running commands when the environment may not be provisioned. For platform-scoped work, prefer the root dev.yml commands: Use dev up for setup and setup recovery. For protocol schema/model work, use dev protocol <command>. For cross-platform changes, use the repo-wide aggregates: dev lint, dev test, dev check, dev format, and…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- platforms/android/AGENTS.mdAGENTS.md
- platforms/swift/.cursor/rules/swift-development.mdcCursor rule
- platforms/swift/.cursor/rules/swift-test.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 23
Run dev commands from the repo root or any platform directory.
- Very specific: line 33
Use dev up for setup and setup recovery.
- Very specific: line 44
Prefer the dev swift ... commands for Swift package and sample builds.
- Very specific: line 73
Use --local to build the React Native side against those in-repo sources.
- Distinctive: line 91
When reviewing either PR, do not report the absence of the other step as a defect.
- Very specific: line 132
Never commit a Podfile.lock generated with --local.
- Very specific: line 135
Never hardcode USE_LOCAL_SDK=1 into a script, dev.yml, or a workflow.
- Very specific: line 146
Treat storefront environment and generated sample app configuration values as sensitive.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository layout
platforms/
swift/ # iOS Swift Package and CocoaPods sources
android/ # Android library and sample apps
react-native/ # React Native wrapper
web/ # Web component package and sample app
protocols/universal-commerce-protocol/embedded-checkout-protocol/ # cross-platform communication layer and protocol language artifacts based on UCP
e2e/ # cross-platform end-to-end tests
.github/ # workflows, issue templates, CODEOWNERSDev workflow
AI agents: All commands require the
shadowenv exec --prefix to run inside the shadowenv-managed environment.shadowenv exec --dir <repo_root> -- /opt/dev/bin/dev up shadowenv exec --dir <repo_root> -- /opt/dev/bin/dev test [ARGS]
Run dev commands from the repo root or any platform directory. Use dev up
before running commands when the environment may not be provisioned.
For platform-scoped work, prefer the root dev.yml commands:
- Android:
dev android <command> - Swift:
dev swift <command> - React Native:
dev react-native <command>ordev rn <command> - Web:
dev web <command>
Use dev up for setup and setup recovery.
For protocol schema/model work, use dev protocol <command>.
For cross-platform changes, use the repo-wide aggregates: dev lint,
dev test, dev check, dev format, and dev build. Use
dev <platform> format for formatting; fix remains an alias for existing
workflows.
Swift Xcode builds
Prefer the dev swift ... commands for Swift package and sample builds. When
running xcodebuild directly for Swift package, Swift sample, or React Native
iOS sample work, always include -disableAutomaticPackageResolution so Xcode
uses the committed Package.resolved files instead of silently updating package
pins. This prevents sample app dependencies such as Apollo iOS from being
written into the repo-root Swift package lockfile.
React Native and the native SDKs
Default: do not pass --local, and do not set USE_LOCAL_SDK=1. React Native builds
resolve the published native SDKs from CocoaPods and Maven Central. That is what CI does, and
it is what almost all React Native work needs.
The question that decides it
Does the native API you need already exist in the published version pinned at
checkoutKit.nativeSdkVersions in
platforms/react-native/package.json?
- Yes — do not use
--local. Editing files underplatforms/swift/orplatforms/android/does not on its own require it. - No — you are adding that API in this PR. Only then is
--localcorrect.
The one workflow that needs it
--local covers a single case: you changed the Swift or Kotlin public API, and you want to
integrate the React Native side against it now, before that native SDK version ships.
- Make the Swift or Kotlin public API change and submit it in a PR.
- Use
--localto build the React Native side against those in-repo sources.
Expect this state while you do it:
- CI stays red and the PR is not mergeable. CI resolves published artifacts only. It does not
accept a
Podfile.lockor a Maven resolution produced by--local. - The PR becomes mergeable once the native release reaches CocoaPods and Maven Central and
checkoutKit.nativeSdkVersionsis bumped to it.
This is a local development aid for early integration. It is not part of normal development.
Review staged native and React Native work
The native SDK release and its React Native adoption are intentionally separate:
- Land and publish the Swift and/or Android public API.
- Once that version is available from CocoaPods and Maven Central, open a React Native PR that bumps
checkoutKit.nativeSdkVersionsand adopts the API.
When reviewing either PR, do not report the absence of the other step as a defect. In
particular, do not ask a native SDK PR to update the React Native pin or bridge in the
same PR. Do not report an early React Native integration that uses --local as broken
solely because its default CI build still resolves the previous published SDK; that is an
expected, temporary merge gate until the native release is published and the pin is
updated.
A version-pin mismatch is a defect only when the React Native change is intended to
merge against published artifacts and the required native release is already available,
but the PR does not update checkoutKit.nativeSdkVersions.
Scope
--local concerns the native SDK sources:
platforms/swift/— the iOS Swift SDK / CocoaPods sourcesplatforms/android/— the Android SDK / Maven artifact sourcesprotocols/universal-commerce-protocol/embedded-checkout-protocol/languages/kotlin/— Kotlin protocol artifacts consumed by the Android SDK
It does not concern the React Native wrapper platform folders, which build from source either way:
platforms/react-native/ios/platforms/react-native/android/
What it does
- iOS: wires CocoaPods to the in-repo
platforms/swift/sources via a local path instead of a released pod version. - Android: publishes the in-repo Android SDK and Kotlin protocol artifacts to Maven Local, then resolves
com.shopify:checkout-kitandcom.shopify:embedded-checkout-protocolfrom there.
dev rn ios --local
dev rn android --local
dev rn test android --localRe-run the relevant command whenever platforms/swift/, platforms/android/, or
protocols/universal-commerce-protocol/embedded-checkout-protocol/languages/kotlin/ changes, so the build re-resolves those sources.
Rules
- Never commit a
Podfile.lockgenerated with--local. It records a local path, andplatforms/react-native/scripts/check_published_podfile_lockfails CI on it. Regenerate withenv -u USE_LOCAL_SDK dev rn pod-install. - Never hardcode
USE_LOCAL_SDK=1into a script,dev.yml, or a workflow. It has to stay an explicit choice made on the command line, or local runs stop matching CI and can resolve a stale artifact from~/.m2.platforms/react-native/scripts/check_no_local_sdk_defaultfails CI on it. - The React Native Android sample uses exclusive Maven Local resolution for those two
com.shopifymodules whenUSE_LOCAL_SDK=1. Keep that filtering in the sample Gradle build; duplicating exclusive repository filters for the same modules elsewhere can break dependency resolution.
Sensitive configuration
Treat storefront environment and generated sample app configuration values as
sensitive. Never print, commit, paste, or document real values from .env,
generated platform config, access tokens, merchant identifiers, shop IDs,
account IDs. Use synthetic placeholders for docs and
verification.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

