Repository navigation
docs: add AGENTS.md for SDK integrators - #132
Merged
Merged
Conversation
Integrators increasingly build against this SDK with coding agents. This repo already had a `CLAUDE.md`, but it was written for contributors to the wrapper — yarn commands, bob build, the bridge architecture, mapper files. None of that helps someone consuming the package from npm, which is who almost everyone pointing an agent at this repo actually is. Ironically, that contributor file held exactly the tribal knowledge integrators burn iterations rediscovering, buried in a "Platform Constraints" bullet list: Proguard must be disabled, and React Native 0.75.x needs a `patch-package` workaround for Kotlin 2.2.x. Those are now first-class sections with the reasoning and the failure mode spelled out. ## The file swap - `CLAUDE.md` -> `CONTRIBUTING_AGENTS.md`, contents preserved, with a new header naming its audience and pointing integrators at `AGENTS.md`. It sits next to `CONTRIBUTING.md`, which covers the same audience for humans - New `AGENTS.md` for integrators - `CLAUDE.md` is now a symlink to `AGENTS.md`, so an agent that only knows that filename lands on the integrator doc by default — the right guess for the common case, with the contributor doc one link away DELETING the contributor content was never on the table; it is the only written record of how the bridge fits together. ## Contents All verified against this repo or the published packages: - npm install, current version (`2026.8.1`), and the native SDKs it wraps (iOS `2.6.0` / Android `2.6.1`) - Android `minSdk` 28 / `compileSdk` 36, AGP 8.9.1+ / Gradle 8.13+, Kotlin 2.2.21 - Proguard must be off. The debug build works, the release build compiles, and the SDK breaks at runtime once R8 has stripped bytecode it loads reflectively - The Kotlin 2.2.x `patch-package` workaround, with the two error strings it fixes and a link to `docs/KOTLIN_COMPATIBILITY.md` - iOS deployment target 16, and the setup Run Script phase that has to sit after `[CP] Embed Pods Frameworks` - Not compatible with Expo Go - Which files hold the sandbox credentials, and that the placeholders stay placeholders. Initialization is NATIVE and per-platform; only `authorize()` is JS - Required permissions on both platforms - The ordering rule: initialize -> request permissions -> `authorize()`. Any manager call before authorization rejects with `NOT_AUTHORIZED` - Mock reader testing, including that the wrapper exposes only `showMockReaderUI()` / `hideMockReaderUI()` because that is all the native frameworks expose — there is NO programmatic way to simulate a card tap, so an agent must ask a human to drive the floating button rather than hang waiting on a payment promise - Links to the per-page docs markdown rather than the HTML pages, which are iframe shells that return only nav to a fetch Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Armaxis
marked this pull request as ready for review
September 28, 2026 21:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrators increasingly build against Mobile Payments SDK with coding agents, and none of the four public SDK repos carries agent-readable integration guidance. This repo is the exception that proves the point: it already had a
CLAUDE.md, but it targets contributors to the wrapper — yarn commands,bob build, the bridge architecture, the mapper files. None of that helps someone consuming the package from npm, which is who almost everyone pointing an agent at this repo actually is.Ironically, that contributor file held exactly the tribal knowledge integrators burn iterations rediscovering, buried in a "Platform Constraints" bullet list: Proguard must be disabled, and React Native 0.75.x needs a
patch-packageworkaround for Kotlin 2.2.x. Undocumented constraints like these cost agents entire iterations — the Android release build compiles fine and then fails at runtime once R8 has stripped bytecode the SDK loads reflectively. Both are now first-class sections with the reasoning and the failure mode spelled out.What happened to the existing
CLAUDE.mdNot deleted — it's the only written record of how the bridge fits together.
CLAUDE.md→CONTRIBUTING_AGENTS.md, contents preserved, with a new header naming its audience and pointing integrators atAGENTS.md. It sits next toCONTRIBUTING.md, which serves the same audience for humansAGENTS.mdfor integratorsCLAUDE.mdis now a symlink toAGENTS.mdSo an agent that only knows the filename
CLAUDE.mdlands on the integrator doc by default — the right guess for the common case — with the contributor doc one clearly-labelled link away. Happy to renameCONTRIBUTING_AGENTS.mdif there's a preferred convention.Contents
All verified against this repo or the published packages:
2026.8.1), and the native SDKs it wraps (iOS2.6.0/ Android2.6.1)minSdk28 /compileSdk36, AGP 8.9.1+ / Gradle 8.13+, Kotlin 2.2.21, and the Proguard rulepatch-packageworkaround, with the two error strings it fixes and a link todocs/KOTLIN_COMPATIBILITY.md[CP] Embed Pods Frameworksauthorize()is JSauthorize(). Any manager call before authorization rejects withNOT_AUTHORIZEDshowMockReaderUI()/hideMockReaderUI()because that's all the native frameworks expose, so simulating a card tap needs a human tapping the floating button. Stated plainly, so an agent asks rather than hangs waiting on a promise…/react-native.md) rather than the HTML pages, which are iframe shells that return only nav to a fetchTicket: https://linear.app/squareup/issue/DEVMOB-1289
Sibling PRs are going up against the Android, iOS, and Flutter repos.
🤖 Generated with Claude Code