Repository navigation
Fix Compose annotation and token guidance in android AGENTS.md - #83
Open
mattpodwysocki wants to merge 2 commits into
Open
mattpodwysocki wants to merge 2 commits into
mattpodwysocki wants to merge 2 commits into
Conversation
AGENTS.md is a standalone drop-in: README.md tells users to curl it into a project root for Codex and Copilot. This one told them the supported Compose annotation API does not exist. The "Compose Annotations Pattern" section was a worked example of what NOT to do, captioned "Declarative annotation components are not supported" and "This doesn't work", steering readers to MapEffect with an annotation manager. references/compose.md documents the opposite: PointAnnotation is the Compose pattern, with rememberIconImage for the icon and interactionsState.onClicked for taps. So the drop-in file was routing people away from the current API and toward a workaround. Replace it with the pattern from references/compose.md, including that iconImage is required or nothing renders, that rememberIconImage is how you load a drawable, and that the onClick parameter is deprecated in favour of interactionsState.onClicked. Also add the programmatic access token path, which the file never mentioned: the import is com.mapbox.common.MapboxOptions, not com.mapbox.maps.MapboxOptions, and manifest meta-data placeholders are not read by the SDK. Found by running the eval suite against AGENTS.md as its own surface. Scores on the agents surface, n=5 per eval: #6 (tappable Compose markers) 7% -> 100% #5 (programmatic access token) 53% -> 87% skill overall 73.9% -> 95.6% #6 was the worst result anywhere in the repo, and the skill's average hid it: at 73.9% mapbox-android-patterns looked mid-pack. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 29, 2026
2 tasks done
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.
The problem
README.md:801tells users tocurla skill'sAGENTS.mdinto their project root for Codex, Copilot, and other AGENTS.md-based tools. It is a standalone drop-in, not an internal note.mapbox-android-patterns/AGENTS.mdused its "Compose Annotations Pattern" section to demonstrate what not to do:references/compose.mddocuments the exact opposite —PointAnnotationis the Compose pattern, withrememberIconImagefor the icon andinteractionsState.onClickedfor taps, and it notes theonClickparameter is deprecated.So the file shipped to project roots was steering developers away from the current API toward a
MapEffectworkaround. Separately, the programmatic token path was missing entirely, including thecom.mapbox.commonvscom.mapbox.mapsimport distinction that decides whether the code compiles.The fix
Replaced the section with the pattern from
references/compose.md, and added the programmatic token path. Nothing here is new material — it is what the skill's own references already say.Measured
Found by running the eval suite against
AGENTS.mdas its own surface (added in #80), at--repeats=5:#6 scored 0/3 on every API expectation across all five runs and was the worst result anywhere in the repo. The skill average hid it: at 73.9%,
mapbox-android-patternslooked mid-pack. Only the per-eval view surfaced it.#5's remaining 87% is within its own run-to-run range (75–100%), so it is not a further content defect.
Note on ordering
This branches from
mainand is independent of #80, so it can merge in either order. The--surfaceand--repeatsrunner flags used to measure this live in #80; re-running these numbers before that merges needs itsscripts/eval.js.🤖 Generated with Claude Code