From f684607f01c9dcba540be49f02dd9178bab70170 Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Thu, 2 Jul 2026 08:08:42 -0500 Subject: [PATCH] =?UTF-8?q?feat(skills):=20roster-discovery=20hardening=20?= =?UTF-8?q?=E2=80=94=20use=20run=20artist=20context;=20never=20trust=20the?= =?UTF-8?q?=20org=20list=20alone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two failures observed live (recoupable/chat#1837): headless agents ignored the artist they were given and roster-guessed, then resolved GET /artists?org_id=… — the ORG's roster ("Rostrum Pacific", 1 unrelated artist) — and declared a 59-artist personal roster's artist missing (chats fd8e8b26, aa4eb91f). recoup-platform-api-access now instructs: (1) if the run context provides an artist_account_id, use it directly — skip discovery entirely; (2) org_id-scoped lists are the org's roster, not yours — check the personal GET /api/artists before concluding an artist is absent. Co-Authored-By: Claude Opus 4.8 (1M context) --- skills/recoup-platform-api-access/SKILL.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/skills/recoup-platform-api-access/SKILL.md b/skills/recoup-platform-api-access/SKILL.md index 0fb3d16..94628ec 100644 --- a/skills/recoup-platform-api-access/SKILL.md +++ b/skills/recoup-platform-api-access/SKILL.md @@ -30,8 +30,20 @@ If neither var is set, ask the user to authenticate — don't retry blindly. `account_id` + row `id`. - **D — add an artist** → use recoup-roster-add-artist. -**Roster discovery:** `GET /accounts/id` → `GET /artists` (your roster; `org_id` -optional — orgs are often empty, so don't stop when `organizations` is `[]`). +**Skip discovery when the run gives you the artist.** If your context/system +prompt provides an `artist_account_id` (scheduled tasks and headless runs pass +one), **use it directly** — call `/api/artists/{that id}/*` and get to work. Do +not search the roster to "confirm" an artist you were already given. + +**Roster discovery (only when no artist context exists):** `GET /accounts/id` → +`GET /artists` (your **personal** roster; `org_id` optional — orgs are often +empty, so don't stop when `organizations` is `[]`). + +> ⚠️ **`GET /artists?org_id=…` returns the ORG's roster, not yours** — often a +> different, tiny list. Never conclude an artist "doesn't exist" from the +> org-scoped list alone: check the plain personal `GET /api/artists` first. (Real +> failure: an agent resolved `$RECOUP_ORG_ID` → a 1-artist org list and declared +> a 59-artist personal roster's artist missing.) > **Use `account_id`, not the list `id`, for every `/artists/{id}/*` sub-resource** > (socials/posts/fans key on `account_id`; the list's top-level `id` 404s). And