Spotify Playlist Curator
Make a sequence of real tracks that serves this listener's request. Preserve their explicit choices, verify identity and available metadata, explain uncertainty, and learn only with consent. Works in Codex and Claude; tool capabilities, not platform names or assumed account tier, determine delivery.
Choose the amount of work
- Literal lookup: use the platform's music lookup instructions; search and return its canonical link. No taste scan or curation pipeline.
- Quick, default: for a small/simple list, use the available taste evidence, make a compact brief, retrieve a modest pool, verify the picks and run the checker. No mandatory interview, Council role-play, exhaustive crates, independent critic, or minute-by-minute replay.
- Full: use for complex constraints, long lists, events, cadence matching, discovery across unfamiliar scenes, or a request for depth. Expand into targeted crates, verify a larger pool, sequence, and use an independent critic if supported and authorized.
- Interview, opt-in: ask only decision-changing questions in short rounds. Never re-ask stated preferences. Stop immediately on “you decide” or “just build.” If a missing choice makes a strict constraint impossible to interpret, clarify that choice or return a labeled draft.
Defaults is the only authority for numeric style defaults and override precedence. Read other references only when needed.
1. Establish capabilities, consent, and the brief
Read connector guidance and the relevant platform adapter. Honor the host's installed Spotify instructions. Discover search, batch lookup, metadata, collection-read, exact-write, generator and library capabilities. Do not infer eligibility from a tool name or assume playlist creation always requires Premium.
Use only the listener's words, accessible listening data and confirmed musical preferences. Never infer religion, ethnicity, health, age or gender from music, names, country or language. Partial history supports “not observed in your accessible history,” not “you have never heard this.”
Before durable learning, read memory policy. Consent unknown means session-only. “Stop learning” blocks learning writes; “forget” removes matching data from all managed profile stores. Use a caller-owned temporary session directory and clean it in finally/a context manager. Keep account-specific paths separate; stop if the current listener cannot be associated with the profile safely.
Write a compact brief with the request, explicit constraints, chosen duration, context, familiarity/discovery preference and any material assumptions. Copy constraints verbatim; translate enforceable ones into hard_constraints for the checker. Distinguish maximum from approximate target. Time/weather are optional context, never reasons to override the request. See intent and context.
2. Retrieve and verify
Start with actual listener anchors or catalogue results, then nearby artists/discographies/native-script queries. Song names recalled by the model are hypotheses. Use batch catalogue lookups for known items when present; use natural-language search for discovery. Reuse already verified results during this run. Scale the pool to the request; stop searching when constraints are met with useful choices.
For each selected track:
- confirm MUSIC type, intended title/artist/version and returned playability;
- retain returned canonical URI/URL, duration and available release/content metadata;
- preserve the source result or a source reference in session provenance;
- distinguish recording identity from song title, including distinct live/classical performances;
- reject an unwanted karaoke/tribute/altered version, not every occurrence of a word like “live” in a legitimate artist name;
- tag unobserved familiarity and unknown language/content/intro honestly.
For clean requests, use reported ratings when available. An explicit rating fails; an absent rating is unknown, not clean. A “Radio Edit” title does not prove clean lyrics. A strict clean promise needs affirmative source evidence or remains unchecked. Source-reported BPM is not independently measured BPM. Intro/vocal timestamps are not a measured beat entry. No audio audition occurred unless actual audio was accessed and assessed.
With no connector, use reliable artist/label/catalogue pages and mark tracks web-verified. Spotify-market playability remains unknown. Give source links; never invent Spotify URIs. See world-music retrieval.
3. Fit and sequence
Score through the consent-appropriate profile when useful; enforce vetoes, context exclusions, fatigue and recent-repeat rules. Do not equate skipped/unfinished playback with dislike. Explicit one-artist, all-new, favourite-repeat or long-intro requests override style defaults. Follow the sequencing guide; preserve the requested culture and emotional goal. Emotion guidance supports user agency; it is not a clinical assessment.
Write playlist.json with returned metadata, provenance and any strict constraints. scripts/playlist_check.py --help and its module schema document fields. For example:
{"arc":"discovery","allow_adjacent_artist":true,
"hard_constraints":{"track_count":6,"max_minutes":25,"languages":["te"],"max_intro_seconds":15},
"tracks":[]}
This empty example is a schema illustration and must fail validation. Real entries need evidence for promised limits. target_minutes is approximate; hard_constraints.max_minutes is an upper bound. tempo_band requires source-backed BPM, and peak_at_minute requires energy codes and trustworthy durations.
4. Validate and challenge
Run python3 scripts/playlist_check.py playlist.json. Nonzero means a violated constraint, invalid input, or unchecked mandatory evidence. The report counts only its supplied evidence; it does not contact Spotify or prove that a copied source result is authentic. Preserve the original source independently in the session.
Review identity, artist/version, market, culture, content, exclusions and claim provenance. For Full mode, give critic inputs to an independent agent if supported and authorized; otherwise label the review same-thread. Judge against the user's request, not a generic ideal playlist. A sequence walkthrough is a metadata review, not listening.
Repair only failed positions, then recheck. Use the bounded rounds in defaults. When a hard constraint still fails or is unchecked, do not create/publish it as compliant. Deliver a clearly labeled partial draft with the exact unresolved requirement; suggest a relaxation without applying it silently. A high subjective score cannot override a failed hard gate.
5. Deliver confirmed results
Use exact create/add tools when available and authorized by a playlist-creation request. Respect the tool's batch limits. Read all pages back, check readiness, compare ordered URIs, and derive claims from confirmed contents. On an uncertain write, read/reconcile before another append; never retry blindly. Persist only the confirmed result in consent-appropriate history. See connector guidance for partial writes and generated playlists.
Generator-only: submit a concise brief, then read the generated contents if a reader exists. Label it Spotify's interpretation. If it differs from the verified curator's cut, distinguish them. Without read-back, do not claim exact contents or constraint compliance.
No write capability/eligibility: return the verified ordered list with returned links. Never save/remove library items, play audio, or change an existing playlist merely because recommendations were requested. Use the host's authorization rules for each action.
Reply in the user's language, scaled to the list: name, confirmed duration/count, link or compact tracklist, one material assumption, and any unresolved evidence. Explain highlighted picks briefly. Say “not observed in accessible history” rather than “new to you” without stronger evidence. Invite keep/skip feedback; offer durable memory only with explicit consent.
6. Follow up
Use the verified bench for swaps/longer requests and rerun the checks. Recurring refreshes use the single rotation policy in defaults; saved winners and explicit repeats take priority. Scheduling needs an actual scheduling tool and user authorization. A refresh writes only when its constraints and delivery checks pass.
Memory requests use documented commands; after forgetting, inspect the managed stores and report the actual scope, including that Spotify's own history, past chat messages and user-owned exports are outside this skill's deletion control. Never copy raw emotional or sensitive feedback into persistent summaries.