AppWorld API preflight: verify target set, limits, and schema first
Failures across Spotify and simple_note tasks share one pattern: the solver assumed API behavior or task scope and started bulk work before checking the actual API/task constraints.
Preflight checklist
- Re-read the task and fix the concrete target set before mutating. Defaults
can be wrong in destructive scopes (e.g., "my song library and playlists"
requires both
show_playlist_libraryandshow_liked_playlists). - Probe one record before looping. Print a sample response and access only
keys observed or documented there; do not assume fields such as
album_title. - Check pagination limits before bulk fetching. Prefer
page_limit=20withpage_indexiteration; an over-largepage_limitreturns HTTP 422. - Use focused query parameters for targeted lookup. Empty queries return recency/pinned-first pages that can bury the target record.
During and after
- Stop on the first unexpected error (
KeyError, 422, 401) and inspect the actual response/docs, then rerun with corrected arguments. - Verify accumulated results cover the full target set before answering or marking the task complete.
This is a cross-task planning/verification skill. App-specific procedures stay in their topic skills; this skill enforces preflight checks before bulk API work.